Minor bits and bobs from upstream.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user