Stop a potential NPE in Gas Gauges.

This commit is contained in:
Ben Spiers committed 2014-07-30 15:09:27 +01:00
1 parent c97464649d
commit 2b7300bfa3
1 file changed
+1 -1
@@ -44,7 +44,7 @@ public class GuiGasGauge extends GuiGauge<Gas>
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