summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorTahg <tahgtahv@gmail.com>2011-12-06 08:48:45 -0500
committerTahg <tahgtahv@gmail.com>2011-12-06 08:48:45 -0500
commiteead44a6929a3de6068e2b81185013e1c6ee033f (patch)
tree4c979d93b2bae1d2e31d3afa8ec726af54a8a539 /src/main
parent57112887cac7f4c8d63159ddc8f1f5b817b819d6 (diff)
downloadcraftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar
craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar.gz
craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar.lz
craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.tar.xz
craftbukkit-eead44a6929a3de6068e2b81185013e1c6ee033f.zip
fix NPE issue with CB inventory
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java2
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) {