From d3a4bf095c6a1332f5f8cee90aec372bf36dfdb9 Mon Sep 17 00:00:00 2001 From: Raoul Van den Berge Date: Sun, 19 Jun 2016 17:28:21 +0200 Subject: [PATCH] Fix issue with scroll wheel, fixes #128 --- CHANGELOG.md | 3 +++ src/main/java/refinedstorage/gui/GuiBase.java | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 79e99b23b..3101a555f 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ - Added support for Storage Drawers void upgrade - Added support for Deep Storage Unit API again +**Bugfixes** +- Fixed crash when using scroll wheel + ### 0.7.15 **Bugfixes** - Fixed not being able to scroll with the scroll wheel using MouseTweaks diff --git a/src/main/java/refinedstorage/gui/GuiBase.java b/src/main/java/refinedstorage/gui/GuiBase.java index 82e3f13e9..3fc2d0723 100755 --- a/src/main/java/refinedstorage/gui/GuiBase.java +++ b/src/main/java/refinedstorage/gui/GuiBase.java @@ -127,7 +127,7 @@ public abstract class GuiBase extends GuiContainer { int d = Mouse.getEventDWheel(); - if (d != 0) { + if (scrollbar != null && d != 0) { scrollbar.wheel(d); } }