Explorar o código

Fix runtime exception

Felix Paul Kühne %!s(int64=9) %!d(string=hai) anos
pai
achega
9d94a132da
Modificáronse 1 ficheiros con 6 adicións e 1 borrados
  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) {