[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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user