From b70f5fd139e071e7c27b04c6f898bbf4198fe6b4 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Tue, 20 Apr 2021 11:36:39 +0200 Subject: [PATCH] Simplify Region.hasType --- 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 908f6b1b..3d0cfe34 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/region/Region.java @@ -204,6 +204,9 @@ public class Region { if (prototype == null) { return false; } + if (regionType == null) { + return false; + } switch (regionType) { case BUILD: return prototype.getBuild() != null;