diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-10-08 20:55:16 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2020-10-14 23:16:35 +0300 |
commit | 00764cc236d8a7a794b2522dbc8577f35f290dd4 (patch) | |
tree | 49aaa331e5e7e21c7b7b30c473abb89696c1753d /indra/newview | |
parent | 6299326bed3efd9367445c281eff00b8985a8c6d (diff) |
SL-14079 crash accessing LLHUDText
LLHUDObject has a lot of deriveds stored as LLPointer<LLHUDObject>, no-virtual destructor is unlikely to be cause of the crash, but might be related
Diffstat (limited to 'indra/newview')
-rw-r--r-- | indra/newview/llfloaterworldmap.h | 1 | ||||
-rw-r--r-- | indra/newview/llhudobject.h | 2 | ||||
-rw-r--r-- | indra/newview/llhudtext.cpp | 5 |
3 files changed, 5 insertions, 3 deletions
diff --git a/indra/newview/llfloaterworldmap.h b/indra/newview/llfloaterworldmap.h index fce945df6c..97e99297cf 100644 --- a/indra/newview/llfloaterworldmap.h +++ b/indra/newview/llfloaterworldmap.h @@ -33,7 +33,6 @@ #define LL_LLFLOATERWORLDMAP_H #include "llfloater.h" -#include "llhudtext.h" #include "llmapimagetype.h" #include "lltracker.h" #include "llslurl.h" diff --git a/indra/newview/llhudobject.h b/indra/newview/llhudobject.h index 2f7a98c86c..ce128519ea 100644 --- a/indra/newview/llhudobject.h +++ b/indra/newview/llhudobject.h @@ -102,7 +102,7 @@ protected: static void sortObjects(); LLHUDObject(const U8 type); - ~LLHUDObject(); + virtual ~LLHUDObject(); virtual void render() = 0; virtual void renderForTimer() {}; diff --git a/indra/newview/llhudtext.cpp b/indra/newview/llhudtext.cpp index 82824861a9..72d28a3d44 100644 --- a/indra/newview/llhudtext.cpp +++ b/indra/newview/llhudtext.cpp @@ -565,7 +565,10 @@ S32 LLHUDText::getMaxLines() void LLHUDText::markDead() { - sTextObjects.erase(LLPointer<LLHUDText>(this)); + // make sure we have at least one pointer + // till the end of the function + LLPointer<LLHUDText> ptr(this); + sTextObjects.erase(ptr); LLHUDObject::markDead(); } |