diff options
author | megamage <none@none> | 2009-04-09 17:15:40 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-04-09 17:15:40 -0500 |
commit | 1694ab1f9525043b8a020350e2b77dec69a9245c (patch) | |
tree | ca1eaa7b42c26bfc17ec50449212624d1e3eabca | |
parent | fc040ef111f9190f52c31137ce38cc13fff6484d (diff) |
*Update Object deconstruct check.
--HG--
branch : trunk
-rw-r--r-- | src/game/Object.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp index 8aadd510fa9..924188bc3e2 100644 --- a/src/game/Object.cpp +++ b/src/game/Object.cpp @@ -85,17 +85,16 @@ Object::~Object( ) //if(m_objectUpdated) // ObjectAccessor::Instance().RemoveUpdateObject(this); - if(m_uint32Values) + if(IsInWorld()) { - if(IsInWorld()) - { - ///- Do NOT call RemoveFromWorld here, if the object is a player it will crash - sLog.outCrash("Object::~Object - guid="I64FMTD", typeid=%d deleted but still in world!!", GetGUID(), GetTypeId()); - assert(false); - } + sLog.outCrash("Object::~Object - guid="I64FMTD", typeid=%d deleted but still in world!!", GetGUID(), GetTypeId()); + assert(false); + } - assert(!m_objectUpdated); + assert(!m_objectUpdated); + if(m_uint32Values) + { //DEBUG_LOG("Object desctr 1 check (%p)",(void*)this); delete [] m_uint32Values; delete [] m_uint32Values_mirror; |