From 37dabaf71efc2a001288703b55bca67d3f568419 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 6 Jun 2009 20:24:50 -0500 Subject: [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 --- src/game/GameObject.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/game/GameObject.cpp') diff --git a/src/game/GameObject.cpp b/src/game/GameObject.cpp index 239fe826087..106c41f720e 100644 --- a/src/game/GameObject.cpp +++ b/src/game/GameObject.cpp @@ -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; } -- cgit v1.2.3