aboutsummaryrefslogtreecommitdiff
path: root/src/game/Pet.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-28 16:04:37 -0600
committermegamage <none@none>2009-03-28 16:04:37 -0600
commiteb894f39e8e05cfe2f266107da4410d19558ff80 (patch)
tree744f14294cf8ee616f894f93842ee8d02139261a /src/game/Pet.cpp
parent3c624f7c630305b4409a205af580c711f06cc33c (diff)
*First remove object from world then unregister it. This may fix some crashes.
--HG-- branch : trunk
Diffstat (limited to 'src/game/Pet.cpp')
-rw-r--r--src/game/Pet.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index afa9b6eb1c5..b2bc134a2c0 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -85,10 +85,9 @@ void Pet::RemoveFromWorld()
///- Remove the pet from the accessor
if(IsInWorld())
{
- ///- Remove the pet from the accessor
- ObjectAccessor::Instance().RemoveObject(this);
///- Don't call the function for Creature, normal mobs + totems go in a different storage
Unit::RemoveFromWorld();
+ ObjectAccessor::Instance().RemoveObject(this);
}
}