Fix crash in Spell::EffectApplyAura.

Fixes issue #657.

--HG--
branch : trunk
This commit is contained in:
Trazom62
2010-02-07 18:16:53 +01:00
parent 8c87b682d3
commit b0ea16f10b

View File

@@ -2593,15 +2593,15 @@ void Spell::EffectTeleportUnits(uint32 i)
void Spell::EffectApplyAura(uint32 i)
{
if (!m_spellAura)
if (!m_spellAura || !unitTarget)
return;
assert (unitTarget == m_spellAura->GetOwner());
assert(unitTarget == m_spellAura->GetOwner());
m_spellAura->_ApplyEffectForTargets(i);
}
void Spell::EffectApplyAreaAura(uint32 i)
{
if (!m_spellAura)
if (!m_spellAura || !unitTarget)
return;
assert (unitTarget == m_spellAura->GetOwner());
m_spellAura->_ApplyEffectForTargets(i);