Sfoglia il codice sorgente

VLCTrackSelectorView: avoid using current title if not selected

Alexandre Janniaux 5 anni fa
parent
commit
8cb6557d15
1 ha cambiato i file con 3 aggiunte e 2 eliminazioni
  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;