Stop a potential NPE in Gas Gauges.

This commit is contained in:
Ben Spiers 2014-07-30 15:09:27 +01:00
parent c97464649d
commit 2b7300bfa3

View file

@ -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