浏览代码

Fix runtime exception

Felix Paul Kühne 9 年之前
父节点
当前提交
9d94a132da
共有 1 个文件被更改,包括 6 次插入1 次删除
  1. 6 1
      Sources/VLCLibraryViewController.m

+ 6 - 1
Sources/VLCLibraryViewController.m

@@ -544,7 +544,12 @@ static NSString *kUsingTableViewToShowData = @"UsingTableViewToShowData";
     /* add all remaining files */
     NSArray *allFiles = [MLFile allFiles];
     for (MLFile *file in allFiles) {
-        if (file.labels.count > 0) continue;
+        if (file.labels != nil) {
+            @synchronized(file.labels) {
+                if (file.labels.count > 0)
+                    continue;
+            }
+        }
 
         if (!file.isShowEpisode && !file.isAlbumTrack) {
             @synchronized(self) {