From a03a3a2a8da806e6c635354dd964788d816a097c Mon Sep 17 00:00:00 2001 From: kennytv Date: Mon, 9 Aug 2021 09:08:15 +0200 Subject: [PATCH] Fix NPE in 1.16 TranslatableRewriter Closes ViaVersion/ViaVersion#2655 --- .../protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java index ef991ec9..e012fb37 100644 --- a/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java +++ b/common/src/main/java/com/viaversion/viabackwards/protocol/protocol1_15_2to1_16/chat/TranslatableRewriter1_16.java @@ -54,7 +54,8 @@ public class TranslatableRewriter1_16 extends TranslatableRewriter { @Override public void processText(JsonElement value) { super.processText(value); - if (!value.isJsonObject()) return; + + if (value == null || !value.isJsonObject()) return; // c o l o r s JsonObject object = value.getAsJsonObject();