Explorar el Código

x-callback-url: fix infinite recursion on invalid URL schemes (closes #10)

(cherry picked from commit 5236dd0326266088a76bb8351cab4b52ecb9f81f)
Felix Paul Kühne hace 9 años
padre
commit
78aeb90c8e
Se han modificado 1 ficheros con 5 adiciones y 2 borrados
  1. 5 2
      Sources/VLCDownloadViewController.m

+ 5 - 2
Sources/VLCDownloadViewController.m

@@ -187,9 +187,12 @@
                 [_currentDownloadFilename removeObjectAtIndex:0];
             }
             downloadWasStarted = YES;
-        } else
+        } else {
             APLog(@"Unknown download scheme '%@'", downloadScheme);
-
+            [_currentDownloads removeObjectAtIndex:0];
+            _currentDownloadType = 0;
+            return;
+        }
 
         if (downloadWasStarted) {
             if (!_backgroundTaskIdentifier || _backgroundTaskIdentifier == UIBackgroundTaskInvalid) {