Core/Spell: fix a potential null dereference crash

This commit is contained in:
ariel-
2016-11-15 12:02:31 -03:00
parent cdd7461d25
commit 64304d8b2b

View File

@@ -1255,7 +1255,7 @@ bool SpellInfo::IsAffectedBySpellMod(SpellModifier const* mod) const
bool SpellInfo::CanPierceImmuneAura(SpellInfo const* auraSpellInfo) const
{
// aura can't be pierced
if (auraSpellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
if (!auraSpellInfo || auraSpellInfo->HasAttribute(SPELL_ATTR0_UNAFFECTED_BY_INVULNERABILITY))
return false;
// these spells pierce all available spells (Resurrection Sickness for example)