Merge pull request #4 from yassinMi/main

fixed mutex lifetime issue
This commit is contained in:
Stone_Red
2023-11-22 16:41:07 +01:00
committed by GitHub
+2 -1
View File
@@ -8,11 +8,12 @@ namespace ClipCMD;
/// </summary> /// </summary>
public partial class App : Application public partial class App : Application
{ {
Mutex mutex;
protected override void OnStartup(StartupEventArgs e) protected override void OnStartup(StartupEventArgs e)
{ {
const string appName = "ClipCMD"; const string appName = "ClipCMD";
_ = new Mutex(true, appName, out bool createdNew); mutex = new Mutex(true, appName, out bool createdNew);
if (!createdNew) if (!createdNew)
{ {