Skip to content

Commit

Permalink
NPE Fix: ProductionPanel#initRules:124 - java.lang.NullPointerException
Browse files Browse the repository at this point in the history
#12140  (#12141)

* fixing NullPointerException
  • Loading branch information
zemjak authored Nov 28, 2023
1 parent 35129a7 commit c9f6b69
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,12 @@ public void actionPerformed(final ActionEvent e) {
final PurchaseDelegate purchaseDelegate = data.getPurchaseDelegate();

// Restore pending production that was loaded from the save game.
purchase = purchaseDelegate.getPendingProductionRules();
if (purchaseDelegate.getPendingProductionRules() == null) {
purchase = new IntegerMap<>();
} else {
purchase = purchaseDelegate.getPendingProductionRules();
}

purchase =
TabbedProductionPanel.getProduction(
player,
Expand Down

0 comments on commit c9f6b69

Please sign in to comment.