Browse Source

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

(cherry picked from commit 259e78483b2c6787aeb4bbf30b2badb2ac7349ca)
Carola Nitz 7 years ago
parent
commit
58a7c54835
1 changed files with 5 additions and 0 deletions
  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:@"_"];