소스 검색

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

Pierre d'Herbemont 15 년 전
부모
커밋
776bf5b63e
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  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;
 }