aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-11 17:59:56 -0600
committermegamage <none@none>2008-11-11 17:59:56 -0600
commit26d2b9f138dd6ca283cfc6efbdb6405e3175d2f6 (patch)
tree3b3cfaa87bdb1ea9568c14cdb80d99dc4dc00304 /src
parentd06130f88c836f42342519723acb0cb926daae72 (diff)
[svn] Fix a bug that tame beast may crash server.
--HG-- branch : trunk
Diffstat (limited to 'src')
-rw-r--r--src/game/SpellEffects.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp
index d21f9ff7525..dfbe11803e5 100644
--- a/src/game/SpellEffects.cpp
+++ b/src/game/SpellEffects.cpp
@@ -3960,6 +3960,7 @@ void Spell::EffectTameCreature(uint32 /*i*/)
finish();
Pet* pet = m_caster->CreateTamedPetFrom(creatureTarget,m_spellInfo->Id);
+ if(!pet) return;
// kill original creature
creatureTarget->setDeathState(JUST_DIED);