From e319334b03ab201262cc8570dc13af457c4fdff3 Mon Sep 17 00:00:00 2001 From: Yunfan Li <56597220+liyunfan1223@users.noreply.github.com> Date: Sat, 22 Mar 2025 13:59:32 +0800 Subject: [PATCH] Fix frost nova crash (#1106) --- src/strategy/mage/MageActions.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/strategy/mage/MageActions.cpp b/src/strategy/mage/MageActions.cpp index 10603199..b32c77fa 100644 --- a/src/strategy/mage/MageActions.cpp +++ b/src/strategy/mage/MageActions.cpp @@ -16,7 +16,10 @@ Value* CastPolymorphAction::GetTargetValue() { return context->GetValueToCreature() && target->ToCreature()->HasMechanicTemplateImmunity(1 << (MECHANIC_FREEZE - 1))) + if (!target || !target->IsInWorld()) + return false; + + if (target->ToCreature() && target->ToCreature()->HasMechanicTemplateImmunity(1 << (MECHANIC_FREEZE - 1))) return false; if (target->isFrozen())