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 1a8793d2a..88bea5e3c 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 3e94b72b9..788197266 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<>();