Skip to content

Commit 1b22ea4

Browse files
committed
Removed incorrect assert in GUI_COMMAND_OBJECT_UPGRADE
1 parent ada64af commit 1b22ea4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/game/logic/object/object.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4203,10 +4203,11 @@ void Object::Do_Command_Button(const CommandButton *button, CommandSourceType ty
42034203
const UpgradeTemplate *upgrade = button->Get_Upgrade_Template();
42044204
captainslog_dbgassert(upgrade != nullptr, "Undefined upgrade '%s' in player upgrade command", "UNKNOWN");
42054205

4206-
if (upgrade == nullptr
4207-
|| upgrade->Get_Type() == UPGRADE_TYPE_OBJECT
4206+
if (upgrade != nullptr
4207+
&& upgrade->Get_Type() == UPGRADE_TYPE_OBJECT
42084208
&& (Has_Upgrade(upgrade) || !Affected_By_Upgrade(upgrade))) {
4209-
goto l1;
4209+
break;
4210+
42104211
}
42114212

42124213
ProductionUpdateInterface *production = Get_Production_Update_Interface();

0 commit comments

Comments
 (0)