Prevent NPE in Coolant API

This commit is contained in:
CovertJaguar 2013-11-23 23:23:38 -08:00
parent b301571629
commit 14dc0014c9

View file

@ -29,7 +29,7 @@ public final class IronEngineCoolant {
}
public static Coolant getCoolant(FluidStack fluidStack) {
return fluidStack != null ? liquidCoolants.get(fluidStack.getFluid().getName()) : null;
return fluidStack != null && fluidStack.getFluid() != null ? liquidCoolants.get(fluidStack.getFluid().getName()) : null;
}
private IronEngineCoolant() {