From 4a52ff756a9c1475e1bb8d2eb6b7c512c56b0124 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Tue, 6 Dec 2011 08:48:45 -0500 Subject: [PATCH] fix NPE issue with CB inventory By: Tahg --- .../java/org/bukkit/craftbukkit/inventory/CraftInventory.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java index 801d5f23ad..07d528a1f0 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/paper-server/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) {