Skip to content

Commit

Permalink
Removed incorrect assert (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
6emmes authored Oct 31, 2024
1 parent baab9dd commit bcc87c7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/game/logic/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit bcc87c7

Please sign in to comment.