Fix potential NullPointerException on C'Thun (#107)

Reported from a crash on C'Thun it appeared there was a NPE in Creature.cpp
This commit is contained in:
Elmsroth 2020-07-28 22:27:04 +01:00 committed by Antz
parent 5af7e0d49f
commit 3875a3b094

View file

@ -2734,7 +2734,7 @@ bool Creature::MeetsSelectAttackingRequirement(Unit* pTarget, SpellEntry const*
return false; return false;
} }
if (selectFlags & SELECT_FLAG_IN_LOS && !IsWithinLOSInMap(pTarget)) if (pSpellInfo && selectFlags & SELECT_FLAG_IN_LOS && !DisableMgr::IsDisabledFor(DISABLE_TYPE_SPELL, pSpellInfo->Id, pTarget, SPELL_DISABLE_LOS) && !IsWithinLOSInMap(pTarget))
{ {
return false; return false;
} }