diff options
author | Tahg <tahgtahv@gmail.com> | 2011-12-06 08:48:45 -0500 |
---|---|---|
committer | Tahg <tahgtahv@gmail.com> | 2011-12-06 08:48:45 -0500 |
commit | eead44a6929a3de6068e2b81185013e1c6ee033f (patch) | |
tree | 4c979d93b2bae1d2e31d3afa8ec726af54a8a539 | |
parent | 57112887cac7f4c8d63159ddc8f1f5b817b819d6 (diff) | |
download | craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar.gz craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar.lz craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar.xz craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.zip |
fix NPE issue with CB inventory
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 801d5f23..07d528a1 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -169,6 +169,8 @@ public class CraftInventory implements org.bukkit.inventory.Inventory { } ItemStack[] inventory = getContents(); for (int i = 0; i < inventory.length; i++) { + if (inventory[i] == null) continue; + boolean equals = false; if (withAmount) { |