*Attempt to fix PetAI crash, thanks WarHead

--HG--
branch : trunk
This commit is contained in:
maximius
2009-09-11 16:44:59 -07:00
parent 2bb0c31978
commit 9c28c82a66
+1 -1
View File
@@ -415,7 +415,7 @@ void PetAI::MovementInform(uint32 moveType, uint32 data)
{
// If data is owner's GUIDLow then we've reached follow point,
// otherwise we're probably chasing a creature
if (data == me->GetCharmerOrOwner()->GetGUIDLow() && me->GetCharmInfo()->IsReturning())
if (me->GetCharmerOrOwner() && me->GetCharmInfo() && data == me->GetCharmerOrOwner()->GetGUIDLow() && me->GetCharmInfo()->IsReturning())
{
me->GetCharmInfo()->SetIsAtStay(false);
me->GetCharmInfo()->SetIsReturning(false);