Procházet zdrojové kódy

macosx/framework: Take the extension mgr lock when enumerating.

Pierre d'Herbemont před 15 roky
rodič
revize
776bf5b63e
1 změnil soubory, kde provedl 2 přidání a 0 odebrání
  1. 2 0
      Sources/VLCExtensionsManager.m

+ 2 - 0
Sources/VLCExtensionsManager.m

@@ -64,11 +64,13 @@ static VLCExtensionsManager *sharedManager = nil;
         return _extensions;
     _extensions = [[NSMutableArray alloc] init];
     extension_t *ext;
+    vlc_mutex_lock(&_instance->lock);
     FOREACH_ARRAY(ext, _instance->extensions)
         VLCExtension *extension = [[VLCExtension alloc] initWithInstance:ext];
         [_extensions addObject:extension];
         [extension release];
     FOREACH_END()
+    vlc_mutex_unlock(&_instance->lock);
     return _extensions;
 }