From 78addc33036597854d896b81dfb789f0f73e9918 Mon Sep 17 00:00:00 2001 From: Ben Spiers Date: Wed, 30 Jul 2014 15:09:27 +0100 Subject: [PATCH] Stop a potential NPE in Gas Gauges. --- src/main/java/mekanism/client/gui/GuiGasGauge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/mekanism/client/gui/GuiGasGauge.java b/src/main/java/mekanism/client/gui/GuiGasGauge.java index be7e7bc19..0ed50aba1 100644 --- a/src/main/java/mekanism/client/gui/GuiGasGauge.java +++ b/src/main/java/mekanism/client/gui/GuiGasGauge.java @@ -44,7 +44,7 @@ public class GuiGasGauge extends GuiGauge return dummyType.getIcon(); } - return infoHandler.getTank().getGas().getGas().getIcon(); + return (infoHandler.getTank() != null && infoHandler.getTank().getGas() != null && infoHandler.getTank().getGas().getGas() != null) ? infoHandler.getTank().getGas().getGas().getIcon() : null; } @Override