Explorar o código

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

(cherry picked from commit a9ef4f5710d68a6af0fac44ef60e264c389dc415)
Carola Nitz %!s(int64=7) %!d(string=hai) anos
pai
achega
b23cde5c87
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Sources/VLCDropboxController.m

+ 1 - 1
Sources/VLCDropboxController.m

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