diff options
author | Roman / Nea <roman.graef@gmail.com> | 2022-01-19 02:24:22 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-18 20:24:22 -0500 |
commit | 0fb9202a79289200bc73b6c468d109c50eb1f5f5 (patch) | |
tree | 13ba94d55e96cf8f781d8f218dc4066420ecad0f /src/main/java | |
parent | 1961426de2c41021a3bd393fc52b15ae062dc9a1 (diff) | |
download | NotEnoughUpdates-0fb9202a79289200bc73b6c468d109c50eb1f5f5.tar.gz NotEnoughUpdates-0fb9202a79289200bc73b6c468d109c50eb1f5f5.tar.bz2 NotEnoughUpdates-0fb9202a79289200bc73b6c468d109c50eb1f5f5.zip |
fix weird NPE (#66)
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java index fda6dd03..ecf58976 100644 --- a/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java +++ b/src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java @@ -944,8 +944,8 @@ public class TradeWindow { int x = i % 4; int y = i / 4; - int containerIndex = ourTradeIndexes[i]; - if (containerIndex < 0) continue; + Integer containerIndex = ourTradeIndexes[i]; + if (containerIndex == null || containerIndex < 0) continue; if (mouseX > guiLeft + 10 + x * 18 - 1 && mouseX < guiLeft + 10 + x * 18 + 18) { if (mouseY > guiTop + 15 + y * 18 - 1 && mouseY < guiTop + 15 + y * 18 + 18) { |