Browse Source

Fix runtime exception

Felix Paul Kühne 9 years ago
parent
commit
9d94a132da
1 changed files with 6 additions and 1 deletions
  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) {