From e285a88e13fb9178d40968b4fbbe58f334ee2503 Mon Sep 17 00:00:00 2001 From: Kurt Gilpin Date: Sat, 12 Jun 2021 12:13:48 -0500 Subject: [PATCH] Fix crash when casting with no target (#1390) --- zone/spells.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zone/spells.cpp b/zone/spells.cpp index 0197d35c6..bcbe48d9f 100644 --- a/zone/spells.cpp +++ b/zone/spells.cpp @@ -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) {