[7969] Remove gameobject from owner gameobjecs list at expire. Author: Ambal

This will prevent delayd owner access from gameobject destructor
    in time remove list proccessing and fix possible related problems
    with crosslinked pointers.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-06-06 20:24:50 -05:00
parent 9f9a9f8207
commit 37dabaf71e
+4 -1
View File
@@ -414,7 +414,10 @@ void GameObject::Update(uint32 /*p_time*/)
if(GetOwnerGUID())
{
m_respawnTime = 0;
if(Unit* owner = GetOwner())
owner->RemoveGameObject(this, false);
SetRespawnTime(0);
Delete();
return;
}