From 87bddae480fc855d8e5332f8ce43e8ec919963bf Mon Sep 17 00:00:00 2001 From: Octav Sandulescu Date: Sat, 24 Nov 2012 09:44:21 +0200 Subject: [PATCH] Guard against an NPE in the refinery GUI. --- common/buildcraft/factory/gui/GuiRefinery.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/buildcraft/factory/gui/GuiRefinery.java b/common/buildcraft/factory/gui/GuiRefinery.java index 67ddfd76..582ecf6b 100644 --- a/common/buildcraft/factory/gui/GuiRefinery.java +++ b/common/buildcraft/factory/gui/GuiRefinery.java @@ -82,6 +82,10 @@ public class GuiRefinery extends GuiAdvancedInterface { if (slot != null) { LiquidStack liquid = LiquidContainerRegistry.getLiquidForFilledItem(mc.thePlayer.inventory.getItemStack()); + if(liquid == null) { + return; + } + container.setFilter(position, liquid.itemID, liquid.itemMeta); } }