]> git.saurik.com Git - veency.git/commitdiff
Use @synchronized instead of manual [lock/unlock].
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 10 Nov 2014 03:46:05 +0000 (19:46 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 10 Nov 2014 03:46:05 +0000 (19:46 -0800)
Tweak.mm

index db1f6232568a81ff1ebf1cdac9c8f4eb2db7fbbf..9f45f29a0bb6de7420c78aa276ccc5875856f3be 100644 (file)
--- a/Tweak.mm
+++ b/Tweak.mm
@@ -945,7 +945,7 @@ static void VNCEnabled() {
     if (screen_ == NULL)
         return;
 
-    [lock_ lock];
+    @synchronized (lock_) {
 
     Boolean valid;
     bool enabled(CFPreferencesGetAppBooleanValue(CFSTR("Enabled"), CFSTR("com.saurik.Veency"), &valid));
@@ -963,7 +963,7 @@ static void VNCEnabled() {
             running_ = false;
         }
 
-    [lock_ unlock];
+    }
 }
 
 static void VNCNotifyEnabled(