From f92ae938063060c8c1eeae9ec863dca1645e1985 Mon Sep 17 00:00:00 2001 From: Kandera Date: Thu, 7 Jun 2012 14:48:43 -0400 Subject: Core/Spells: fix crash introduced in d719730929db84674cee0b56834e2a9ef248e472 (thx vincent-michael) --- src/server/game/Entities/Unit/Unit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 3315760a2af..e89e5df2a0c 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -2893,7 +2893,7 @@ void Unit::SetCurrentCastedSpell(Spell* pSpell) InterruptSpell(CURRENT_AUTOREPEAT_SPELL); 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); } break; -- cgit v1.2.3