From 85166635b4ac07c8ba18d61c64a6e3bbab9c7b76 Mon Sep 17 00:00:00 2001 From: Craig Raw Date: Tue, 25 Oct 2022 08:52:23 +0200 Subject: [PATCH] followup --- .../java/com/sparrowwallet/sparrow/SparrowWallet.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java b/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java index 230f28f8..6ecaee93 100644 --- a/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java +++ b/src/main/java/com/sparrowwallet/sparrow/SparrowWallet.java @@ -99,8 +99,17 @@ public class SparrowWallet { com.sun.javafx.application.LauncherImpl.launchApplication(SparrowDesktop.class, SparrowWalletPreloader.class, argv); } } catch(UnsupportedOperationException e) { + Drongo.removeRootLogAppender("STDOUT"); getLogger().error("Unable to launch application", e); - System.out.println("Use Sparrow Server on a headless (no display) system"); + System.out.println("No display detected. Use Sparrow Server on a headless (no display) system."); + + try { + if(instance != null) { + instance.freeLock(); + } + } catch(InstanceException instanceException) { + getLogger().error("Unable to free instance lock", e); + } } }