aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2008-12-14 12:04:08 -0600
committermegamage <none@none>2008-12-14 12:04:08 -0600
commitefe09c1d924012000bdf6c399679d54f4d603c99 (patch)
tree070ce9481a816334c87eeb92af9335a378e1dc7a /src
parent1d2179a52957f019e5603917c78f4c552f8dba20 (diff)
*Fix the bug that ~Creature causes crash. (deleted when possessed)
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/Unit.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp
index 8bf2968fd40..1face06a8c1 100644
--- a/src/game/Unit.cpp
+++ b/src/game/Unit.cpp
@@ -11045,10 +11045,9 @@ void Unit::CleanupsBeforeDelete()
RemoveAllAuras();
RemoveAllGameObjects();
RemoveAllDynObjects();
- GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
-
UnpossessSelf(false);
RemoveAllFromVision();
+ GetMotionMaster()->Clear(false); // remove different non-standard movement generators.
}
RemoveFromWorld();
}