#4886 Crash on LLTeleportRequestViaLure::toOstream
parent
1c393aed78
commit
1fc0eca119
|
|
@ -167,7 +167,7 @@ std::map<S32, std::string> LLTeleportRequest::sTeleportStatusName = { { kPending
|
||||||
class LLTeleportRequestViaLandmark : public LLTeleportRequest
|
class LLTeleportRequestViaLandmark : public LLTeleportRequest
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId);
|
LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId, bool log = true);
|
||||||
virtual ~LLTeleportRequestViaLandmark();
|
virtual ~LLTeleportRequestViaLandmark();
|
||||||
|
|
||||||
virtual void toOstream(std::ostream& os) const;
|
virtual void toOstream(std::ostream& os) const;
|
||||||
|
|
@ -179,6 +179,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
inline const LLUUID &getLandmarkId() const {return mLandmarkId;};
|
inline const LLUUID &getLandmarkId() const {return mLandmarkId;};
|
||||||
|
bool mLogOnDestruction = true;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LLUUID mLandmarkId;
|
LLUUID mLandmarkId;
|
||||||
|
|
@ -5008,16 +5009,25 @@ void LLTeleportRequest::toOstream(std::ostream& os) const
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// LLTeleportRequestViaLandmark
|
// LLTeleportRequestViaLandmark
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
LLTeleportRequestViaLandmark::LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId)
|
LLTeleportRequestViaLandmark::LLTeleportRequestViaLandmark(const LLUUID &pLandmarkId, bool log)
|
||||||
: LLTeleportRequest(),
|
: LLTeleportRequest()
|
||||||
mLandmarkId(pLandmarkId)
|
, mLandmarkId(pLandmarkId)
|
||||||
|
, mLogOnDestruction(true)
|
||||||
{
|
{
|
||||||
LL_INFOS("Teleport") << "LLTeleportRequestViaLandmark created, " << *this << LL_ENDL;
|
if (log)
|
||||||
|
{
|
||||||
|
// Workaround to not log twice for LLTeleportRequestViaLure, besides this wouldn't have logged fully.
|
||||||
|
LL_INFOS("Teleport") << "LLTeleportRequestViaLandmark created, " << *this << LL_ENDL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
LLTeleportRequestViaLandmark::~LLTeleportRequestViaLandmark()
|
LLTeleportRequestViaLandmark::~LLTeleportRequestViaLandmark()
|
||||||
{
|
{
|
||||||
LL_INFOS("Teleport") << "~LLTeleportRequestViaLandmark, " << *this << LL_ENDL;
|
if (mLogOnDestruction)
|
||||||
|
{
|
||||||
|
// Workaround to not crash on toOstream for derived classes and to not log twice.
|
||||||
|
LL_INFOS("Teleport") << "~LLTeleportRequestViaLandmark, " << *this << LL_ENDL;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLTeleportRequestViaLandmark::toOstream(std::ostream& os) const
|
void LLTeleportRequestViaLandmark::toOstream(std::ostream& os) const
|
||||||
|
|
@ -5047,16 +5057,20 @@ void LLTeleportRequestViaLandmark::restartTeleport()
|
||||||
// LLTeleportRequestViaLure
|
// LLTeleportRequestViaLure
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID &pLureId, bool pIsLureGodLike)
|
LLTeleportRequestViaLure::LLTeleportRequestViaLure(const LLUUID& pLureId, bool pIsLureGodLike)
|
||||||
: LLTeleportRequestViaLandmark(pLureId),
|
: LLTeleportRequestViaLandmark(pLureId, false),
|
||||||
mIsLureGodLike(pIsLureGodLike)
|
mIsLureGodLike(pIsLureGodLike)
|
||||||
{
|
{
|
||||||
LL_INFOS("Teleport") << "LLTeleportRequestViaLure created" << LL_ENDL;
|
LL_INFOS("Teleport") << "LLTeleportRequestViaLure created: " << *this << LL_ENDL;
|
||||||
}
|
}
|
||||||
|
|
||||||
LLTeleportRequestViaLure::~LLTeleportRequestViaLure()
|
LLTeleportRequestViaLure::~LLTeleportRequestViaLure()
|
||||||
{
|
{
|
||||||
LL_INFOS("Teleport") << "~LLTeleportRequestViaLure" << LL_ENDL;
|
if (mLogOnDestruction)
|
||||||
|
{
|
||||||
|
LL_INFOS("Teleport") << "~LLTeleportRequestViaLure: " << *this << LL_ENDL;
|
||||||
|
mLogOnDestruction = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void LLTeleportRequestViaLure::toOstream(std::ostream& os) const
|
void LLTeleportRequestViaLure::toOstream(std::ostream& os) const
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue