Scripts/Icecrown Citadel: Fixed possible crash in npc_darnavanAI

Closes #3188
This commit is contained in:
Shauren
2011-09-24 11:29:49 +02:00
parent d01a761f53
commit 29ba648fa3

View File

@@ -891,7 +891,7 @@ class npc_darnavan : public CreatureScript
if (me->HasUnitState(UNIT_STAT_CASTING))
return;
if (_canShatter && me->getVictim()->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL))
if (_canShatter && me->getVictim() && me->getVictim()->IsImmunedToDamage(SPELL_SCHOOL_MASK_NORMAL))
{
DoCastVictim(SPELL_SHATTERING_THROW);
_canShatter = false;