Prechádzať zdrojové kódy

VLCTrackSelectorView: avoid using current title if not selected

Alexandre Janniaux 5 rokov pred
rodič
commit
8cb6557d15
1 zmenil súbory, kde vykonal 3 pridanie a 2 odobranie
  1. 3 2
      Sources/VLCTrackSelectorView.m

+ 3 - 2
Sources/VLCTrackSelectorView.m

@@ -96,8 +96,9 @@
         if ([playbackController numberOfTitles] > 1)
             sections++;
 
-        if ([playbackController numberOfChaptersForCurrentTitle] > 1)
-            sections++;
+        if (playbackController.indexOfCurrentTitle >= 0)
+            if ([playbackController numberOfChaptersForCurrentTitle] > 1)
+                sections++;
     }
 
     return sections;