[Hotfix] Fix crash pertaining to new PVPEnableGuardFactionAssist code (#1393)

Pushing through due to crash severity on master
This commit is contained in:
Chris Miles 2021-06-13 02:09:23 -05:00 committed by GitHub
parent 4a067e4e9b
commit e1e5873398
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2056,7 +2056,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
}
//Guard Assist Code
if (RuleB(Character, PVPEnableGuardFactionAssist) && IsDetrimentalSpell(spell_id) && spell_target != this) {
if (RuleB(Character, PVPEnableGuardFactionAssist) && spell_target && IsDetrimentalSpell(spell_id) && spell_target != this) {
if (IsClient() || (HasOwner() && GetOwner()->IsClient())) {
auto& mob_list = entity_list.GetCloseMobList(spell_target);
for (auto& e : mob_list) {