Skip to content

Commit

Permalink
Update object.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
6emmes committed Oct 30, 2024
1 parent 2386925 commit 716f94a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/game/logic/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4203,11 +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))) {
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 716f94a

Please sign in to comment.