mirror of
https://github.com/Stone-Red-Code/ClipCMD.git
synced 2026-09-04 00:46:10 +02:00
fixed mutex lifetime issue
This commit is contained in:
+2
-1
@@ -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)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user