diff options
author | megamage <none@none> | 2008-11-25 21:25:52 -0600 |
---|---|---|
committer | megamage <none@none> | 2008-11-25 21:25:52 -0600 |
commit | 9bbf3e9493bea8e7195ebef3a18a2e6a64be2914 (patch) | |
tree | f53f15525e27aff0787ba7eec325a5cd53b35b3a /src/game/DynamicObject.cpp | |
parent | 31fe63f6446c2decad7c4a48c7ea1bdb7f17a21f (diff) |
*Fix build.
*Fix the bug that janalai summons too many adds.
--HG--
branch : trunk
Diffstat (limited to 'src/game/DynamicObject.cpp')
-rw-r--r-- | src/game/DynamicObject.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/game/DynamicObject.cpp b/src/game/DynamicObject.cpp index b61b6654167..50539796ab3 100644 --- a/src/game/DynamicObject.cpp +++ b/src/game/DynamicObject.cpp @@ -140,7 +140,13 @@ void DynamicObject::Delete() // are switched to world container on creation and they are also set to active if (isActive()) { - GetMap()->SwitchGridContainers(this, false); + Map* map = GetMap(); + if(!map) + { + sLog.outError("DynamicObject (TypeId: %u Entry: %u GUID: %u) at attempt add to move list not have valid map (Id: %u).",GetTypeId(),GetEntry(),GetGUIDLow(),GetMapId()); + return; + } + map->SwitchGridContainers(this, false); setActive(false); } SendObjectDeSpawnAnim(GetGUID()); |