diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game/PetAI.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/game/PetAI.cpp b/src/game/PetAI.cpp index d70b0c1be1f..dda4a64abec 100644 --- a/src/game/PetAI.cpp +++ b/src/game/PetAI.cpp @@ -208,11 +208,11 @@ void PetAI::UpdateAI(const uint32 diff) if( !m_creature->HasInArc(M_PI, target) ) { m_creature->SetInFront(target); - if( target->GetTypeId() == TYPEID_PLAYER ) - m_creature->SendUpdateToPlayer( (Player*)target ); + if(target && target->GetTypeId() == TYPEID_PLAYER) + m_creature->SendUpdateToPlayer((Player*)target); if(owner && owner->GetTypeId() == TYPEID_PLAYER) - m_creature->SendUpdateToPlayer( (Player*)owner ); + m_creature->SendUpdateToPlayer((Player*)owner); } m_creature->AddCreatureSpellCooldown(spell->m_spellInfo->Id); |