diff --git a/src/Ai/Base/Actions/GenericActions.cpp b/src/Ai/Base/Actions/GenericActions.cpp index 354cb456e..4371cb402 100644 --- a/src/Ai/Base/Actions/GenericActions.cpp +++ b/src/Ai/Base/Actions/GenericActions.cpp @@ -86,7 +86,7 @@ bool TogglePetSpellAutoCastAction::Execute(Event /*event*/) uint32 spellId = itr->first; const SpellInfo* spellInfo = sSpellMgr->GetSpellInfo(spellId); - if (!spellInfo->IsAutocastable()) + if (!spellInfo || !spellInfo->IsAutocastable()) continue; bool shouldApply = true;