diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/DynamicObject.cpp | 8 | ||||
| -rw-r--r-- | src/game/Unit.cpp | 1 |
2 files changed, 8 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()); diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 3e09fefdd95..0ff6aacb5ef 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -4155,6 +4155,7 @@ void Unit::RemoveAura(AuraMap::iterator &i, AuraRemoveMode mode) } sLog.outDebug("Aura %u now is remove mode %d",Aur->GetModifier()->m_auraname, mode); + assert(!Aur->IsInUse()); Aur->ApplyModifier(false,true); Aur->_RemoveAura(); delete Aur; |
