From 6fcf749e90fc25bb24b90311079054622b4885da Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Wed, 20 Jan 2021 23:22:28 +0100 Subject: [PATCH] make sure GetCaster() is not null --- src/server/scripts/Spells/spell_item.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index ad82c1a000..1599fe2b75 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -1572,6 +1572,11 @@ public: void OnRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/) { + if (!GetCaster()) + { + return; + } + Player* player = GetCaster()->ToPlayer(); if (Creature * creature = player->FindNearestCreature(CREATURE_INSTANT_STATUE_PEDESTAL, 0.0f, true)) {