Fix #557 crash from Analyzer

This commit is contained in:
mezz committed 2015-03-22 15:12:03 -07:00
1 parent 8a870b9c76
commit d71b0e5646
1 file changed
+8 -6
@@ -238,12 +238,14 @@ public class TileAnalyzer extends TilePowered implements ISidedInventory, ILiqui
// Look for bees in input slots.
IInvSlot slot = getInputSlot();
ItemStack inputStack = slot.getStackInSlot();
setInventorySlotContents(SLOT_ANALYZE, inputStack);
slot.setStackInSlot(null);
resourceTank.drain(HONEY_REQUIRED, true);
analyzeTime = TIME_TO_ANALYZE;
sendNetworkUpdate();
if (slot != null) {
ItemStack inputStack = slot.getStackInSlot();
setInventorySlotContents(SLOT_ANALYZE, inputStack);
slot.setStackInSlot(null);
resourceTank.drain(HONEY_REQUIRED, true);
analyzeTime = TIME_TO_ANALYZE;
sendNetworkUpdate();
}
return true;
}