From e2957a1c67ca50e01436f971f721192c65d73030 Mon Sep 17 00:00:00 2001 From: crschnick Date: Mon, 22 Jul 2024 03:50:03 +0000 Subject: [PATCH] Small fixes --- app/src/main/java/io/xpipe/app/core/mode/OperationMode.java | 6 +++--- app/src/main/java/io/xpipe/app/prefs/AppPrefs.java | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java b/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java index 1a8793d2..88bea5e3 100644 --- a/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java +++ b/app/src/main/java/io/xpipe/app/core/mode/OperationMode.java @@ -83,10 +83,10 @@ public abstract class OperationMode { } private static void setup(String[] args) { - // Register stage theming early to make it apply for any potential early popups - ModifiedStage.init(); - try { + // Register stage theming early to make it apply for any potential early popups + ModifiedStage.init(); + // Only for handling SIGTERM Runtime.getRuntime().addShutdownHook(new Thread(() -> { TrackEvent.info("Received SIGTERM externally"); diff --git a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java index 3e94b72b..78819726 100644 --- a/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java +++ b/app/src/main/java/io/xpipe/app/prefs/AppPrefs.java @@ -33,7 +33,7 @@ import java.util.stream.Stream; public class AppPrefs { public static final Path DEFAULT_STORAGE_DIR = - AppProperties.get().getDataDir().resolve("storage"); + AppProperties.get() != null ? AppProperties.get().getDataDir().resolve("storage") : null; private static final String DEVELOPER_MODE_PROP = "io.xpipe.app.developerMode"; private static AppPrefs INSTANCE; private final List> mapping = new ArrayList<>();