Fix some null warnings

This commit is contained in:
mezz committed 2016-10-20 23:51:14 -07:00
1 parent c6783e573c
commit 3178aa890d
22 files changed
+114 -95

No files matched your search

@@ -27,10 +27,7 @@ public class ControlBreweryProgress extends ControlProgressBase {
public void onRenderBackground() {
CraftGUI.Render.texture(ControlBreweryProgress.Brewery, new IPoint(0.0f, 0.0f));
final Brewery.ComponentBreweryLogic logic = Machine.getInterface(Brewery.ComponentBreweryLogic.class, Window.get(this).getInventory());
if (logic.currentCrafting == null) {
return;
}
if (logic.currentCrafting.currentInput == null) {
if (logic == null || logic.currentCrafting == null || logic.currentCrafting.currentInput == null) {
return;
}
final int fermentedHeight = (int) (32.0f * logic.getProgress() / 100.0f);