diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-15 17:56:30 +0300 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2019-07-15 17:56:30 +0300 |
commit | e9a9f71e563f236eabf5dca980913bcbb6f36a94 (patch) | |
tree | 183b98dda03a3612b63e140e6ef9f5cf99757ce5 /indra/newview/llviewerobjectlist.cpp | |
parent | 0771d66acec71a4165eed03e3b0efc24f7d760e5 (diff) |
SL-10908 Safeguards and potential crash fix
Diffstat (limited to 'indra/newview/llviewerobjectlist.cpp')
-rw-r--r-- | indra/newview/llviewerobjectlist.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/newview/llviewerobjectlist.cpp b/indra/newview/llviewerobjectlist.cpp index 932759c86d..2bf04dc204 100644 --- a/indra/newview/llviewerobjectlist.cpp +++ b/indra/newview/llviewerobjectlist.cpp @@ -1383,7 +1383,11 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp) if (objectp) { - objectp->markDead(); // does the right thing if object already dead + // We are going to cleanup a lot of smart pointers to this object, they might be last, + // and object being NULLed while inside it's own function won't be pretty + // so create a pointer to make sure object will stay alive untill markDead() finishes + LLPointer<LLViewerObject> sp(objectp); + sp->markDead(); // does the right thing if object already dead return TRUE; } |