소스 검색

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) {