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
master
Andrey Kleshchev 2020-10-08 20:55:16 +03:00
parent 6299326bed
commit 00764cc236
3 changed files with 5 additions and 3 deletions

View File

@ -33,7 +33,6 @@
#define LL_LLFLOATERWORLDMAP_H
#include "llfloater.h"
#include "llhudtext.h"
#include "llmapimagetype.h"
#include "lltracker.h"
#include "llslurl.h"

View File

@ -102,7 +102,7 @@ protected:
static void sortObjects();
LLHUDObject(const U8 type);
~LLHUDObject();
virtual ~LLHUDObject();
virtual void render() = 0;
virtual void renderForTimer() {};

View File

@ -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();
}