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())