Minor bits and bobs from upstream.

This commit is contained in:
Shyotl
2019-10-18 23:59:41 -05:00
parent 1c1e64f48f
commit 15c3ff0544
5 changed files with 43 additions and 39 deletions

View File

@@ -1355,16 +1355,11 @@ BOOL LLViewerObjectList::killObject(LLViewerObject *objectp)
if (objectp)
{
if (objectp->isDead())
{
// This object is already dead. Don't need to do more.
return TRUE;
}
else
{
objectp->markDead();
}
// 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;
}
return FALSE;