From eb894f39e8e05cfe2f266107da4410d19558ff80 Mon Sep 17 00:00:00 2001 From: megamage Date: Sat, 28 Mar 2009 16:04:37 -0600 Subject: *First remove object from world then unregister it. This may fix some crashes. --HG-- branch : trunk --- src/game/Pet.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/game/Pet.cpp') 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); } } -- cgit v1.2.3