Преглед на файлове

VLCTrackSelectorView: avoid using current title if not selected

Alexandre Janniaux преди 5 години
родител
ревизия
8cb6557d15
променени са 1 файла, в които са добавени 3 реда и са изтрити 2 реда
  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;