aboutsummaryrefslogtreecommitdiff
path: root/src/game/Object.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-06-17 09:57:22 -0500
committermegamage <none@none>2009-06-17 09:57:22 -0500
commite405e6f9ede8c9ce5db647fdffb1dd6c008856eb (patch)
treef328a83ed1da47537f905ecf80bfb4a7c904df1e /src/game/Object.cpp
parent0085745c42eb7e4a483614e5038860c31638123f (diff)
*Fix a crash caused by mailed item deconstructor.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Object.cpp')
-rw-r--r--src/game/Object.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/Object.cpp b/src/game/Object.cpp
index 1afd3ac3ae7..3561621f0bd 100644
--- a/src/game/Object.cpp
+++ b/src/game/Object.cpp
@@ -82,19 +82,20 @@ Object::Object( ) : m_PackGUID(sizeof(uint64)+1)
Object::~Object( )
{
- //if(m_objectUpdated)
- // ObjectAccessor::Instance().RemoveUpdateObject(this);
-
if(IsInWorld())
{
sLog.outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in world!!", GetGUID(), GetTypeId(), GetEntry());
+ if(isType(TYPEMASK_ITEM))
+ sLog.outCrash("Item slot %u", ((Item*)this)->GetSlot());
assert(false);
+ RemoveFromWorld();
}
if(m_objectUpdated)
{
sLog.outCrash("Object::~Object - guid="UI64FMTD", typeid=%d, entry=%u deleted but still in update list!!", GetGUID(), GetTypeId(), GetEntry());
assert(false);
+ ObjectAccessor::Instance().RemoveUpdateObject(this);
}
if(m_uint32Values)