*Fix a crash.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-05-06 18:22:46 +02:00
parent ef4bcb7238
commit 9de6139a39
+1 -1
View File
@@ -186,6 +186,7 @@ Unit::~Unit()
RemoveAllGameObjects(); RemoveAllGameObjects();
RemoveAllDynObjects(); RemoveAllDynObjects();
_DeleteAuras();
if(m_charmInfo) delete m_charmInfo; if(m_charmInfo) delete m_charmInfo;
@@ -11417,7 +11418,6 @@ void Unit::CleanupsBeforeDelete()
//A unit may be in removelist and not in world, but it is still in grid //A unit may be in removelist and not in world, but it is still in grid
//and may have some references during delete //and may have some references during delete
RemoveAllAuras(); RemoveAllAuras();
_DeleteAuras();
InterruptNonMeleeSpells(true); InterruptNonMeleeSpells(true);
m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map::RemoveAllObjectsInRemoveList m_Events.KillAllEvents(false); // non-delatable (currently casted spells) will not deleted now but it will deleted at call in Map::RemoveAllObjectsInRemoveList
CombatStop(); CombatStop();