瀏覽代碼

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

(cherry picked from commit 5236dd0326266088a76bb8351cab4b52ecb9f81f)
Felix Paul Kühne 9 年之前
父節點
當前提交
78aeb90c8e
共有 1 個文件被更改,包括 5 次插入2 次删除
  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) {