Ver código fonte

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

(cherry picked from commit 5236dd0326266088a76bb8351cab4b52ecb9f81f)
Felix Paul Kühne 9 anos atrás
pai
commit
78aeb90c8e
1 arquivos alterados com 5 adições e 2 exclusões
  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) {