浏览代码

VLCDropboxController: show error if the destinationpath is nil and we can't download

(cherry picked from commit 259e78483b2c6787aeb4bbf30b2badb2ac7349ca)
Carola Nitz 7 年之前
父节点
当前提交
58a7c54835
共有 1 个文件被更改,包括 5 次插入0 次删除
  1. 5 0
      Sources/VLCDropboxController.m

+ 5 - 0
Sources/VLCDropboxController.m

@@ -216,6 +216,11 @@
         return;
     }
 
+    if (!destination) {
+        [self _handleError:[NSError errorWithDomain:NSLocalizedString(@"GDRIVE_ERROR_DOWNLOADING_FILE", nil) code:415 userInfo:nil]];
+        return;
+    }
+
     // Need to replace all ' ' by '_' because it causes a `NSInvalidArgumentException ... destination path is nil` in the dropbox library.
     destination = [destination stringByReplacingOccurrencesOfString:@" " withString:@"_"];