*Fix a crash when go is removed but m_ObjectSlot is not cleared.

--HG--
branch : trunk
This commit is contained in:
megamage
2009-08-11 10:14:46 -05:00
parent e3d00708a9
commit a944a0ea4b

View File

@@ -4664,6 +4664,15 @@ void Unit::RemoveGameObject(GameObject* gameObj, bool del)
gameObj->SetOwnerGUID(0);
for(uint32 i = 0; i < 4; ++i)
{
if(m_ObjectSlot[i] == gameObj->GetGUID())
{
m_ObjectSlot[i] = 0;
break;
}
}
// GO created by some spell
if (uint32 spellid = gameObj->GetSpellId())
{