From 2942a2d24736de96202ef9ea993d8f647a7b0914 Mon Sep 17 00:00:00 2001 From: Shane Freeder Date: Sat, 17 Oct 2020 12:20:44 +0100 Subject: [PATCH] Don't assume that entries exist for SafeNBTCopy --- .../Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch b/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch index 42af054ae..04bf5ad90 100644 --- a/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch +++ b/Spigot-Server-Patches/Fix-Non-Full-Status-Chunk-NBT-Memory-Leak.patch @@ -52,7 +52,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + public SafeNBTCopy(NBTTagCompound base, String... keys) { + for (String key : keys) { + this.keys.add(key); -+ this.set(key, base.get(key)); ++ final NBTBase nbtBase = base.get(key); ++ if (nbtBase != null) { ++ this.set(key, nbtBase); ++ } + } + } +