From bb7bd9ef45cd15c7da271c690f5c798cdd340b22 Mon Sep 17 00:00:00 2001 From: Machiavelli Date: Thu, 16 Dec 2010 16:00:56 +0100 Subject: Core/Spells: Fix a possible crash in spell_hun_readiness_SpellScript --HG-- branch : trunk --- src/server/scripts/Spells/spell_hunter.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 5c21563123f..98a7619c82c 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -275,7 +275,9 @@ public: { 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_BESTIAL_WRATH && GetSpellRecoveryTime(spellInfo) > 0) -- cgit v1.2.3