diff --git a/src/action/action_attack.cpp b/src/action/action_attack.cpp index edb485462c..dcb538009a 100644 --- a/src/action/action_attack.cpp +++ b/src/action/action_attack.cpp @@ -492,7 +492,7 @@ bool COrder_Attack::AutoSelectTarget(CUnit &unit) if (this->offeredTarget->IsVisibleAsGoal(*unit.Player) && (!immobile || InAttackRange(unit, *this->offeredTarget))) { newTarget = newTarget ? &BestTarget(unit, *this->offeredTarget, *newTarget) - : this->offeredTarget; + : static_cast(this->offeredTarget); } this->offeredTarget.Reset(); }