From f60aa0b41820ef8082f6e25b4c815404f014e6da Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Wed, 16 Feb 2022 18:55:52 +0000 Subject: [PATCH] Add null check to Heightmap processor "just in case" Fixes #1592 --- .../core/extent/processor/heightmap/HeightmapProcessor.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightmapProcessor.java b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightmapProcessor.java index efdf79846..d2e0384a1 100644 --- a/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightmapProcessor.java +++ b/worldedit-core/src/main/java/com/fastasyncworldedit/core/extent/processor/heightmap/HeightmapProcessor.java @@ -86,8 +86,9 @@ public class HeightmapProcessor implements IBatchProcessor { } else if (getSection == null) { getSection = get.load(layer); // skip empty layer - if (Arrays.equals(getSection, FaweCache.INSTANCE.EMPTY_CHAR_4096) - || Arrays.equals(getSection, AIR_LAYER)) { + if (getSection == null || + Arrays.equals(getSection, FaweCache.INSTANCE.EMPTY_CHAR_4096) || + Arrays.equals(getSection, AIR_LAYER)) { hasSectionGet = false; if (!hasSectionSet) { continue layer;