Check for null in ItemStacks

This commit is contained in:
zml2008 2012-03-01 20:31:01 -08:00
parent a62cf3a059
commit 742b6b61fa

View File

@ -640,7 +640,7 @@ public class BukkitWorld extends LocalWorld {
for (int i = 0; i < size; ++i) {
ItemStack bukkitStack = inven.getItem(i);
if (bukkitStack.getTypeId() > 0) {
if (bukkitStack != null && bukkitStack.getTypeId() > 0) {
contents[i] = new BaseItemStack(
bukkitStack.getTypeId(),
bukkitStack.getAmount(),