Fixed Hohlraum check crash

This commit is contained in:
Aidan C. Brady 2015-03-21 12:42:41 -05:00
parent 79d319cc87
commit 46eb5aa288

View file

@ -93,10 +93,11 @@ public class FusionReactor implements IFusionReactor
if(controller != null) if(controller != null)
{ {
ItemStack hohlraum = controller.inventory[0]; ItemStack hohlraum = controller.inventory[0];
if(hohlraum != null && hohlraum.getItem() instanceof ItemHohlraum) if(hohlraum != null && hohlraum.getItem() instanceof ItemHohlraum)
{ {
GasStack gasStack = ((ItemHohlraum)hohlraum.getItem()).getGas(hohlraum); GasStack gasStack = ((ItemHohlraum)hohlraum.getItem()).getGas(hohlraum);
return gasStack.getGas() == GasRegistry.getGas("fusionFuelDT") && gasStack.amount > 0; return gasStack != null && gasStack.getGas() == GasRegistry.getGas("fusionFuelDT") && gasStack.amount > 0;
} }
} }