Kaynağa Gözat

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

(cherry picked from commit 5236dd0326266088a76bb8351cab4b52ecb9f81f)
Felix Paul Kühne 9 yıl önce
ebeveyn
işleme
78aeb90c8e
1 değiştirilmiş dosya ile 5 ekleme ve 2 silme
  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) {