Check for nulls in stacks returned from extractItem.
This commit is contained in:
parent
6576f72cb4
commit
bacc554832
1 changed files with 3 additions and 1 deletions
|
@ -131,7 +131,9 @@ public class PipeItemsWood extends Pipe implements IPowerReceptor {
|
||||||
ItemStack[] stacks = ((ISpecialInventory) inventory).extractItem(doRemove, from, (int)powerProvider.getEnergyStored());
|
ItemStack[] stacks = ((ISpecialInventory) inventory).extractItem(doRemove, from, (int)powerProvider.getEnergyStored());
|
||||||
if (stacks != null && doRemove) {
|
if (stacks != null && doRemove) {
|
||||||
for (ItemStack stack : stacks) {
|
for (ItemStack stack : stacks) {
|
||||||
powerProvider.useEnergy(stack.stackSize, stack.stackSize, true);
|
if (stack != null) {
|
||||||
|
powerProvider.useEnergy(stack.stackSize, stack.stackSize, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return stacks;
|
return stacks;
|
||||||
|
|
Loading…
Reference in a new issue