From e54ed5e7303386b4003d8febce0b03d76ef1314f Mon Sep 17 00:00:00 2001 From: Emagi Date: Sun, 22 Jun 2025 13:41:18 -0400 Subject: [PATCH] make sure spell data exists for the spell to check detrimental --- source/WorldServer/LuaInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/WorldServer/LuaInterface.cpp b/source/WorldServer/LuaInterface.cpp index 46371bc..4a00734 100644 --- a/source/WorldServer/LuaInterface.cpp +++ b/source/WorldServer/LuaInterface.cpp @@ -880,7 +880,7 @@ void LuaInterface::RemoveSpawnFromSpell(LuaSpell* spell, Spawn* spawn) { ((Entity*)spawn)->RemoveEffectsFromLuaSpell(spell); ((Entity*)spawn)->RemoveWard(spell); - if(spell->spell->GetSpellData()->det_type > 0 && (spell->spell->GetSpellDuration() > 0 || spell->spell->GetSpellData()->duration_until_cancel)) + if(spell->spell && spell->spell->GetSpellData() && spell->spell->GetSpellData()->det_type > 0 && (spell->spell->GetSpellDuration() > 0 || spell->spell->GetSpellData()->duration_until_cancel)) ((Entity*)spawn)->RemoveDetrimentalSpell(spell); } }