From df0000c64be633e80aad2d20d7d3fb0ff5f62c14 Mon Sep 17 00:00:00 2001 From: phpr Date: Wed, 28 May 2014 22:05:47 +0200 Subject: [PATCH] Update BackpackDefinition.java Fix nullPointerException on isValidItem() --- .../storage/forestry/storage/BackpackDefinition.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/forestry_common/storage/forestry/storage/BackpackDefinition.java b/forestry_common/storage/forestry/storage/BackpackDefinition.java index d8f37c586..d509521c1 100755 --- a/forestry_common/storage/forestry/storage/BackpackDefinition.java +++ b/forestry_common/storage/forestry/storage/BackpackDefinition.java @@ -72,7 +72,7 @@ public class BackpackDefinition implements IBackpackDefinition { @Override public boolean isValidItem(EntityPlayer player, ItemStack itemstack) { for (ItemStack stack : getValidItems(player)) - if (stack != null) { + if (stack != null && stack.getItem() != null ) { if (stack.getItemDamage() == Defaults.WILDCARD) { if (stack.getItem() == itemstack.getItem()) return true;