From 4bbf39eb4d18166caf81817e1557fe61b4487f0a Mon Sep 17 00:00:00 2001 From: Jason Mitchell Date: Mon, 28 Oct 2024 21:22:41 -0700 Subject: [PATCH] null guard --- src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java b/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java index 26b5b4379..2596ffdaf 100644 --- a/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java +++ b/src/main/java/net/coderbot/iris/gui/element/IrisGuiSlot.java @@ -108,7 +108,7 @@ public void drawScreen(int mouseX, int mouseY, float partialTicks) { if (scrolling) { this.amountScrolled += ((float) mouseY - this.initialClickY); this.initialClickY = mouseY; - } else { + } else if (this.mc.currentScreen != null ){ for (; !this.mc.gameSettings.touchscreen && Mouse.next(); this.mc.currentScreen.handleMouseInput()) { int dWheel = Mouse.getEventDWheel();