Core/Spells: fix crash introduced in d719730929 (thx vincent-michael)

This commit is contained in:
Kandera
2012-06-07 14:48:43 -04:00
parent 4bfb96fbcf
commit f92ae93806
+1 -1
View File
@@ -2893,7 +2893,7 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell)
InterruptSpell(CURRENT_AUTOREPEAT_SPELL); InterruptSpell(CURRENT_AUTOREPEAT_SPELL);
m_AutoRepeatFirstCast = true; m_AutoRepeatFirstCast = true;
} }
if (m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->CalcCastTime(this) > 0 && IsNonMeleeSpellCasted(false, false, true)) if ((m_currentSpells[CURRENT_GENERIC_SPELL] && m_currentSpells[CURRENT_GENERIC_SPELL]->m_spellInfo->CalcCastTime(this) > 0) && IsNonMeleeSpellCasted(false, false, true))
AddUnitState(UNIT_STATE_CASTING); AddUnitState(UNIT_STATE_CASTING);
} break; } break;