Skip to content

Commit

Permalink
Fix casting logic drain crash with empty basins/tables #1144
Browse files Browse the repository at this point in the history
  • Loading branch information
bonii-xx committed Nov 10, 2014
1 parent 28a4dfe commit 37fd426
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -90,7 +90,7 @@ public int fill (ForgeDirection from, FluidStack resource, boolean doFill)
public FluidStack drain (ForgeDirection from, FluidStack resource, boolean doDrain)
{
// only same liquid
if (liquid.getFluid() != resource.getFluid())
if (liquid != null && liquid.getFluid() != resource.getFluid())
return null;

return drain(resource.amount, doDrain);
Expand Down

0 comments on commit 37fd426

Please sign in to comment.