From 6f4f0043c2ab4efe0f2956e15796e397e3116bbd Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Tue, 18 May 2021 02:16:59 +0200 Subject: [PATCH] fix(Scripts): Crashfix. (#5913) --- src/server/scripts/Spells/spell_hunter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/server/scripts/Spells/spell_hunter.cpp b/src/server/scripts/Spells/spell_hunter.cpp index c0f46d674..9653cfe85 100644 --- a/src/server/scripts/Spells/spell_hunter.cpp +++ b/src/server/scripts/Spells/spell_hunter.cpp @@ -693,10 +693,8 @@ public: SpellCastResult DoCheckCast() { - Guardian* pet = GetCaster()->ToPlayer()->GetGuardianPet(); - ASSERT(pet); // checked in Spell::CheckCast - - if (!pet->IsPet() || !pet->IsAlive()) + Pet* pet = GetCaster()->ToPlayer()->GetPet(); + if (!pet || !pet->IsAlive()) return SPELL_FAILED_NO_PET; // Do a mini Spell::CheckCasterAuras on the pet, no other way of doing this