Pārlūkot izejas kodu

VLCTrackSelectorView: avoid using current title if not selected

Alexandre Janniaux 5 gadi atpakaļ
vecāks
revīzija
8cb6557d15
1 mainītis faili ar 3 papildinājumiem un 2 dzēšanām
  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;