From b73af3e2ec11f8e14a9e138a648860bbb845c1c7 Mon Sep 17 00:00:00 2001 From: yoyosource Date: Sat, 16 Dec 2023 12:48:52 +0100 Subject: [PATCH] Hotfix SimulatorStorage --- .../bausystem/features/simulator/SimulatorStorage.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java index 9ac84989..b3fbcba8 100644 --- a/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java +++ b/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorStorage.java @@ -84,7 +84,9 @@ public class SimulatorStorage implements Enable { SimulatorFormatSimulatorLoader simulatorFormatSimulatorLoader = new SimulatorFormatSimulatorLoader(); YAPIONFormatSimulatorLoader yapionFormatSimulatorLoader = new YAPIONFormatSimulatorLoader(); - for (File file : simulatorsDir.listFiles()) { + File[] files = simulatorsDir.listFiles(); + if (files == null) return; + for (File file : files) { try { List simulators = simFormatSimulatorLoader.load(file) .orElse(null);