fixed mutex lifetime issue

This commit is contained in:
yassinMi
2023-11-22 09:06:10 +00:00
parent bca0c378c1
commit 1afa6cef02
+2 -1
View File
@@ -8,11 +8,12 @@ namespace ClipCMD;
/// </summary>
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)
{