From ac930f0d455b43324260e4c6454b9689ba42c445 Mon Sep 17 00:00:00 2001 From: tomevoll Date: Mon, 28 Mar 2016 08:20:05 +0200 Subject: [PATCH] Fixes nullPointer in GuiGrid ? Think instead of all these null checks, maybe not set that list from the network packet as that is another thread, and instead set a temporary list that the gui forground then pull into the main list before rendering. --- src/main/java/refinedstorage/gui/GuiGrid.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/refinedstorage/gui/GuiGrid.java b/src/main/java/refinedstorage/gui/GuiGrid.java index a42316d84..918cf7ee8 100755 --- a/src/main/java/refinedstorage/gui/GuiGrid.java +++ b/src/main/java/refinedstorage/gui/GuiGrid.java @@ -133,7 +133,9 @@ public class GuiGrid extends GuiBase { for (int i = 0; i < 9 * getVisibleRows(); ++i) { if (slot < items.size()) { - int qty = items.get(slot).getQuantity(); + StorageItem storageItem = items.get(slot); + if(storageItem == null) continue; + int qty = storageItem.getQuantity(); String text;