From 469c572d609d17309b74ff906c60951cd5dd21b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Francesco=20Borz=C3=AC?= Date: Sun, 31 Oct 2021 08:20:51 +0100 Subject: [PATCH] fix(Scripts/SpellHunter): prevent crash in spell_hun_readiness (#8847) --- src/server/scripts/Spells/spell_hunter.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index 9e5def3bd..f45b86d10 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -798,8 +798,12 @@ public: ++next; SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first); - if (spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && spellInfo->Id != SPELL_HUNTER_READINESS && spellInfo->Id != SPELL_HUNTER_BESTIAL_WRATH && - spellInfo->Id != SPELL_DRAENEI_GIFT_OF_THE_NAARU && spellInfo->GetRecoveryTime() > 0) + if (spellInfo + && spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER + && spellInfo->Id != SPELL_HUNTER_READINESS + && spellInfo->Id != SPELL_HUNTER_BESTIAL_WRATH + && spellInfo->Id != SPELL_DRAENEI_GIFT_OF_THE_NAARU + && spellInfo->GetRecoveryTime() > 0) { caster->RemoveSpellCooldown(spellInfo->Id, itr->second.needSendToClient); }