From c28d14206612de1e3ee2b28fbf82b33432ac2754 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Thu, 23 Dec 2021 17:41:21 +0100 Subject: [PATCH] Fix NPE's Signed-off-by: yoyosource --- BauSystem_Main/src/de/steamwar/bausystem/region/Region.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java index 6880ddd8..97ef3f03 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -146,6 +146,9 @@ public class Region { } if (prototype != null) { skin = regionData.getPlainValueOrDefault("skin", prototype.getDefaultSkin()); + if (!prototype.getSkinMap().containsKey(skin)) { + skin = prototype.getDefaultSkin(); + } } regionData.add("skin", skin);