From 8d66ce776c2fea920a17dbc2a33f3d3c7ab6d232 Mon Sep 17 00:00:00 2001 From: Matsv Date: Sun, 14 May 2017 14:47:00 +0200 Subject: [PATCH] Add NullCheck for #657 fixes #663 --- .../ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java index 7239d4873..f55cc9ec5 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_11to1_10/ItemRewriter.java @@ -97,7 +97,7 @@ public class ItemRewriter { } } } - if (item.getAmount() <= 0) item.setAmount((byte) 1); + if (item != null && item.getAmount() <= 0) item.setAmount((byte) 1); } public static void toServer(Item item) {