Explorar el Código

VLCTrackSelectorView: avoid using current title if not selected

Alexandre Janniaux hace 5 años
padre
commit
8cb6557d15
Se han modificado 1 ficheros con 3 adiciones y 2 borrados
  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;