Revert nullptr crash fix as it causes another crash

This commit is contained in:
Ovahlord committed 2018-03-17 16:44:14 +01:00
1 parent afd8675a0a
commit d707a474df
1 file changed
+3 -3
+3 -3
View File
@@ -10139,6 +10139,9 @@ void Unit::CleanupBeforeRemoveFromMap(bool finalCleanup)
// This needs to be before RemoveFromWorld to make GetCaster() return a valid pointer on aura removal
InterruptNonMeleeSpells(true);
if (IsInWorld())
RemoveFromWorld();
ASSERT(GetGUID());
// A unit may be in removelist and not in world, but it is still in grid
@@ -10154,9 +10157,6 @@ void Unit::CleanupBeforeRemoveFromMap(bool finalCleanup)
ClearComboPointHolders();
DeleteThreatList();
getHostileRefManager().deleteReferences();
if (IsInWorld())
RemoveFromWorld();
}
void Unit::CleanupsBeforeDelete(bool finalCleanup)