aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-26 09:22:20 -0600
committermegamage <none@none>2009-03-26 09:22:20 -0600
commita6193d4893a277cb05d6ba59cb83c77e57fc93ef (patch)
treeb42350f3e4ac9ef2e64af2aa18f2a6251e329415
parentcc94fda2b11eaabae9f16a3723b714af256c09b5 (diff)
*Fix a crash.
--HG-- branch : trunk
-rw-r--r--src/game/Pet.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/game/Pet.cpp b/src/game/Pet.cpp
index faf12118a10..71f45507d45 100644
--- a/src/game/Pet.cpp
+++ b/src/game/Pet.cpp
@@ -56,8 +56,8 @@ Pet::~Pet()
{
if(m_uint32Values) // only for fully created Object
{
- if(Unit* owner = GetOwner())
- owner->SetPet(this, false);
+ if(GetOwnerGUID())
+ sLog.outCrash("Pet %u is deconstructed but it still has owner guid", GetEntry());
for (PetSpellMap::iterator i = m_spells.begin(); i != m_spells.end(); ++i)
delete i->second;