1
0

avoid crash for disabled spell/no spell ptr

This commit is contained in:
Emagi 2025-01-29 22:01:51 -05:00
parent 4213beec95
commit d463ed3dc5

View File

@ -2801,7 +2801,7 @@ void SpellProcess::RemoveTargetFromSpell(LuaSpell* spell, Spawn* target, bool re
if (!spell || !target)
return;
LogWrite(SPELL__DEBUG, 0, "Spell", "%s RemoveTargetFromSpell %s (%u).", spell->spell->GetName(), target->GetName(), target->GetID());
LogWrite(SPELL__DEBUG, 0, "Spell", "%s RemoveTargetFromSpell %s (%u).", spell->spell ? spell->spell->GetName() : "INACTIVE_SPELL", target->GetName(), target->GetID());
MRemoveTargetList.writelock(__FUNCTION__, __LINE__);
if(removeCaster && spell->caster && spell->caster == target)