aboutsummaryrefslogtreecommitdiff
path: root/src/main
diff options
context:
space:
mode:
authorRoman / Nea <roman.graef@gmail.com>2022-01-19 02:24:22 +0100
committerGitHub <noreply@github.com>2022-01-18 20:24:22 -0500
commit0fb9202a79289200bc73b6c468d109c50eb1f5f5 (patch)
tree13ba94d55e96cf8f781d8f218dc4066420ecad0f /src/main
parent1961426de2c41021a3bd393fc52b15ae062dc9a1 (diff)
downloadNotEnoughUpdates-0fb9202a79289200bc73b6c468d109c50eb1f5f5.tar.gz
NotEnoughUpdates-0fb9202a79289200bc73b6c468d109c50eb1f5f5.tar.bz2
NotEnoughUpdates-0fb9202a79289200bc73b6c468d109c50eb1f5f5.zip
fix weird NPE (#66)
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/io/github/moulberry/notenoughupdates/miscgui/TradeWindow.java4
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) {