Fix crash when casting with no target (#1390)

This commit is contained in:
Kurt Gilpin 2021-06-12 12:13:48 -05:00 committed by GitHub
parent d162f25536
commit e285a88e13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2047,7 +2047,7 @@ bool Mob::SpellFinished(uint16 spell_id, Mob *spell_target, CastingSlot slot, ui
return false;
//Death Touch targets the pet owner instead of the pet when said pet is tanking.
if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target->HasOwner()) && spell_id == DB_SPELL_CAZIC_TOUCH || spell_id == DB_SPELL_TOUCH_OF_VINITRAS) {
if ((RuleB(Spells, CazicTouchTargetsPetOwner) && spell_target && spell_target->HasOwner()) && spell_id == DB_SPELL_CAZIC_TOUCH || spell_id == DB_SPELL_TOUCH_OF_VINITRAS) {
Mob* owner = spell_target->GetOwner();
if (owner) {