Kaynağa Gözat

library: fix crash if the user is faster with his fingers than us by renaming files

Felix Paul Kühne 11 yıl önce
ebeveyn
işleme
21fdc1d808
1 değiştirilmiş dosya ile 4 ekleme ve 0 silme
  1. 4 0
      Sources/VLCPlaylistViewController.m

+ 4 - 0
Sources/VLCPlaylistViewController.m

@@ -706,6 +706,10 @@ static NSString *kDisplayedFirstSteps = @"Did we display the first steps tutoria
         indexPaths = [self.collectionView indexPathsForSelectedItems];
     else
         indexPaths = [self.tableView indexPathsForSelectedRows];
+
+    if (indexPaths.count < 1)
+        return;
+
     id mediaObject = _foundMedia[[indexPaths[0] row]];
 
     if ([mediaObject isKindOfClass:[MLAlbum class]] || [mediaObject isKindOfClass:[MLShowEpisode class]] || [mediaObject isKindOfClass:[MLShow class]])