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 | 8d77d51e636f5384b0b024350a0a219e041b5446 (patch) | |
| tree | 5411da7404f93816452addc81f9a9715edd2ad1b /indra/newview/llviewerobjectlist.cpp | |
| parent | f486bdbb48dda1364d71b8d80cc3c837efb96284 (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; } |
