diff --git a/Wox/Helper/SingleInstance.cs b/Wox/Helper/SingleInstance.cs index 20a51fefa5..c62fefc0ad 100644 --- a/Wox/Helper/SingleInstance.cs +++ b/Wox/Helper/SingleInstance.cs @@ -302,11 +302,7 @@ namespace Wox.Helper /// public static void Cleanup() { - if (singleInstanceMutex != null) - { - singleInstanceMutex.Close(); - singleInstanceMutex = null; - } + singleInstanceMutex?.ReleaseMutex(); if (channel != null) { diff --git a/Wox/MainWindow.xaml.cs b/Wox/MainWindow.xaml.cs index 7f2aaf60a4..eda169be96 100644 --- a/Wox/MainWindow.xaml.cs +++ b/Wox/MainWindow.xaml.cs @@ -80,7 +80,6 @@ namespace Wox public void CloseApp() { - SingleInstance.singleInstanceMutex.ReleaseMutex(); Application.Current.Shutdown(); }