Check for nulls in stacks returned from extractItem.

This commit is contained in:
JP Sugarbroad 2012-09-08 09:53:10 -07:00
parent 6576f72cb4
commit bacc554832

View file

@ -131,9 +131,11 @@ public class PipeItemsWood extends Pipe implements IPowerReceptor {
ItemStack[] stacks = ((ISpecialInventory) inventory).extractItem(doRemove, from, (int)powerProvider.getEnergyStored());
if (stacks != null && doRemove) {
for (ItemStack stack : stacks) {
if (stack != null) {
powerProvider.useEnergy(stack.stackSize, stack.stackSize, true);
}
}
}
return stacks;
}