diff options
author | megamage <none@none> | 2009-08-11 10:14:46 -0500 |
---|---|---|
committer | megamage <none@none> | 2009-08-11 10:14:46 -0500 |
commit | a944a0ea4b30dcde2eeb9ac60c8491c417b17f69 (patch) | |
tree | 3b8711ffbd4b511e62e1435d306869a70892f2ab | |
parent | e3d00708a9e018ae4adf9f4957d5df27b5245a8c (diff) |
*Fix a crash when go is removed but m_ObjectSlot is not cleared.
--HG--
branch : trunk
-rw-r--r-- | src/game/Unit.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 645c1556861..68d7b1fe02a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -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()) { |