Browse Source

VLCDropBoxController: make sure we're not accidenatlly calling listFolder with nil

(cherry picked from commit a9ef4f5710d68a6af0fac44ef60e264c389dc415)
Carola Nitz 7 years ago
parent
commit
b23cde5c87
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Sources/VLCDropboxController.m

+ 1 - 1
Sources/VLCDropboxController.m

@@ -193,7 +193,7 @@
 - (void)listFiles:(NSString *)path
 - (void)listFiles:(NSString *)path
 {
 {
     // DropBox API prefers an empty path than a '/'
     // DropBox API prefers an empty path than a '/'
-    if ([path isEqualToString:@"/"]) {
+    if (!path || [path isEqualToString:@"/"]) {
         path = @"";
         path = @"";
     }
     }
     [[[self client].filesRoutes listFolder:path] setResponseBlock:^(DBFILESListFolderResult * _Nullable result, DBFILESListFolderError * _Nullable routeError, DBRequestError * _Nullable networkError) {
     [[[self client].filesRoutes listFolder:path] setResponseBlock:^(DBFILESListFolderResult * _Nullable result, DBFILESListFolderError * _Nullable routeError, DBRequestError * _Nullable networkError) {