DRTVWR-476: Defend against late ~LLWatchdogTimeout() calls.
LLAppViewer's heap LLWatchdogTimeout might be destroyed very late -- as late as in LLAppViewer's destructor. By that time, LLAppViewer::cleanup() has already called LLSingletonBase::deleteAll(), destroying the LLWatchdog LLSingleton instance. But LLWatchdogTimeout isa LLWatchdogEntry, and ~LLWatchdogEntry() calls stop(), and stop() tries to remove that instance from LLWatchdog, thus inadvertently resurrecting the deleted LLWatchdog. Which is pointless because the resurrected LLWatchdog has never heard of the LLWatchdogTimeout instance trying to remove itself. Defend LLWatchdogEntry::stop() against the case in which LLWatchdog has already been deleted.master
parent
7f1a200214
commit
ec208ddfac
|
|
@ -91,7 +91,11 @@ void LLWatchdogEntry::start()
|
|||
|
||||
void LLWatchdogEntry::stop()
|
||||
{
|
||||
LLWatchdog::getInstance()->remove(this);
|
||||
// this can happen very late in the shutdown sequence
|
||||
if (! LLWatchdog::wasDeleted())
|
||||
{
|
||||
LLWatchdog::getInstance()->remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
// LLWatchdogTimeout
|
||||
|
|
|
|||
Loading…
Reference in New Issue