diff --git a/src/game/logic/object/object.cpp b/src/game/logic/object/object.cpp index b16a2c101..53b1d6f95 100644 --- a/src/game/logic/object/object.cpp +++ b/src/game/logic/object/object.cpp @@ -4203,10 +4203,13 @@ void Object::Do_Command_Button(const CommandButton *button, CommandSourceType ty const UpgradeTemplate *upgrade = button->Get_Upgrade_Template(); captainslog_dbgassert(upgrade != nullptr, "Undefined upgrade '%s' in player upgrade command", "UNKNOWN"); - if (upgrade == nullptr - || upgrade->Get_Type() == UPGRADE_TYPE_OBJECT - && (Has_Upgrade(upgrade) || !Affected_By_Upgrade(upgrade))) { - goto l1; + if (upgrade == nullptr) { + break; + } + + if (upgrade->Get_Type() == UPGRADE_TYPE_OBJECT + && (Has_Upgrade(upgrade) || !Affected_By_Upgrade(upgrade))) { + break; } ProductionUpdateInterface *production = Get_Production_Update_Interface();