From fa87073666f85360df55220b342e0e3ef3e02e66 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 237d8ed6..b91d6e04 100644 --- a/src/main/java/org/cyclops/integratedscripting/core/network/ScriptingData.java +++ b/src/main/java/org/cyclops/integratedscripting/core/network/ScriptingData.java @@ -79,7 +79,9 @@ public void tick() { public void close() { try { - this.watchService.close(); + if (this.watchService != null) { + this.watchService.close(); + } } catch (IOException e) { e.printStackTrace(); }