summaryrefslogtreecommitdiff
path: root/indra/newview/llhudtext.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-10-08 20:55:16 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-10-08 21:00:52 +0300
commit6531ba9a58c010d6ab8a4fc50afc7be45209e246 (patch)
treefb73a28f0d5923e6bbc671e8ee9e6eaae184efe2 /indra/newview/llhudtext.cpp
parent3ad517c6e20934932af712eec6ac50ee6cd6ac4c (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/llhudtext.cpp')
-rw-r--r--indra/newview/llhudtext.cpp5
1 files changed, 4 insertions, 1 deletions
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();
}