aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2009-03-20 09:39:25 -0600
committermegamage <none@none>2009-03-20 09:39:25 -0600
commitd944be8381757375b064cf189aa2088c2621761d (patch)
tree017ebff1d338eb6cac423e92cd3ab0eaf5351708 /src
parenteea631a0a371d7069c624341f43a51bc0783adc8 (diff)
*Fix a crash for creatures using petAI without charminfo.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/PetAI.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp
index 925f68f7eec..f218818febf 100644
--- a/src/game/PetAI.cpp
+++ b/src/game/PetAI.cpp
@@ -123,6 +123,9 @@ void PetAI::UpdateAI(const uint32 diff)
}
}
+ if(!me->GetCharmInfo())
+ return;
+
if (i_pet.GetGlobalCooldown() == 0 && !i_pet.hasUnitState(UNIT_STAT_CASTING))
{
bool inCombat = me->getVictim();