From 1afa6cef02593fe81aee1f6909cf040237671371 Mon Sep 17 00:00:00 2001 From: yassinMi Date: Wed, 22 Nov 2023 09:06:10 +0000 Subject: [PATCH] fixed mutex lifetime issue --- ClipCMD/App.xaml.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ClipCMD/App.xaml.cs b/ClipCMD/App.xaml.cs index 7680b24..ee633c2 100644 --- a/ClipCMD/App.xaml.cs +++ b/ClipCMD/App.xaml.cs @@ -8,11 +8,12 @@ namespace ClipCMD; /// public partial class App : Application { + Mutex mutex; protected override void OnStartup(StartupEventArgs e) { const string appName = "ClipCMD"; - _ = new Mutex(true, appName, out bool createdNew); + mutex = new Mutex(true, appName, out bool createdNew); if (!createdNew) {