Skip to content

Commit bcc87c7

Browse files
authored
Removed incorrect assert (#1164)
1 parent baab9dd commit bcc87c7

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

src/game/logic/object/object.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4203,10 +4203,13 @@ 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
4208-
&& (Has_Upgrade(upgrade) || !Affected_By_Upgrade(upgrade))) {
4209-
goto l1;
4206+
if (upgrade == nullptr) {
4207+
break;
4208+
}
4209+
4210+
if (upgrade->Get_Type() == UPGRADE_TYPE_OBJECT
4211+
&& (Has_Upgrade(upgrade) || !Affected_By_Upgrade(upgrade))) {
4212+
break;
42104213
}
42114214

42124215
ProductionUpdateInterface *production = Get_Production_Update_Interface();

0 commit comments

Comments
 (0)