Core/Spells: Fix a possible crash in spell_hun_readiness_SpellScript

--HG--
branch : trunk
This commit is contained in:
Machiavelli
2010-12-16 16:00:56 +01:00
parent 4671500172
commit bb7bd9ef45
+3 -1
View File
@@ -275,7 +275,9 @@ public:
{ {
SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first); SpellEntry const *spellInfo = sSpellStore.LookupEntry(itr->first);
if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && ///! If spellId in cooldown map isn't valid, the above will return a null pointer.
if (spellInfo &&
spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER &&
spellInfo->Id != HUNTER_SPELL_READINESS && spellInfo->Id != HUNTER_SPELL_READINESS &&
spellInfo->Id != HUNTER_SPELL_BESTIAL_WRATH && spellInfo->Id != HUNTER_SPELL_BESTIAL_WRATH &&
GetSpellRecoveryTime(spellInfo) > 0) GetSpellRecoveryTime(spellInfo) > 0)