From 027f708ce53dd153415f8f8fd3fc9359cd1fe5e7 Mon Sep 17 00:00:00 2001 From: "C. Vincent" Date: Tue, 22 Oct 2024 08:34:18 -0500 Subject: [PATCH] Fix NPE in ScriptingData if FileWatcher was not initialized --- .../integratedscripting/core/network/ScriptingData.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/cyclops/integratedscripting/core/network/ScriptingData.java b/src/main/java/org/cyclops/integratedscripting/core/network/ScriptingData.java index 13a98ddd..e474a872 100644 --- a/src/main/java/org/cyclops/integratedscripting/core/network/ScriptingData.java +++ b/src/main/java/org/cyclops/integratedscripting/core/network/ScriptingData.java @@ -78,7 +78,9 @@ public void tick() { public void close() { try { - this.watchService.close(); + if (this.watchService != null) { + this.watchService.close(); + } } catch (IOException e) { e.printStackTrace(); }