Felix Paul Kühne пре 10 година
родитељ
комит
ed5576f8ad
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      Sources/VLCGoogleDriveTableViewController.m

+ 5 - 1
Sources/VLCGoogleDriveTableViewController.m

@@ -120,6 +120,11 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
 {
+    [self.tableView deselectRowAtIndexPath:indexPath animated:NO];
+
+    if (indexPath.row >= _googleDriveController.currentListFiles.count)
+        return;
+
     _selectedFile = _googleDriveController.currentListFiles[indexPath.row];
     if (![_selectedFile.mimeType isEqualToString:@"application/vnd.google-apps.folder"]) {
         [_googleDriveController streamFile:_selectedFile];
@@ -130,7 +135,6 @@
         self.currentPath = [self.currentPath stringByAppendingString:_selectedFile.identifier];
         [self _requestInformationForCurrentPath];
     }
-    [self.tableView deselectRowAtIndexPath:indexPath animated:NO];
 }
 
 - (void)triggerDownloadForCell:(VLCCloudStorageTableViewCell *)cell