diff options
| author | n0n4m3 <none@none> | 2010-02-06 19:06:55 +0300 |
|---|---|---|
| committer | n0n4m3 <none@none> | 2010-02-06 19:06:55 +0300 |
| commit | 982296518c7886068691010be9d6b094668e1c31 (patch) | |
| tree | 481f9d33fd9792373dc52ba70aa3226bbf350bf1 /src | |
| parent | 5cb0a6177ccf5de2ad6bd118d11fa12e716c01b6 (diff) | |
Fixed crash in PetAI::UpdateAI.
--HG--
branch : trunk
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); |
