marinofaggiana 4 years ago
parent
commit
38cb619f47
1 changed files with 6 additions and 1 deletions
  1. 6 1
      iOSClient/AutoUpload/NCAutoUpload.m

+ 6 - 1
iOSClient/AutoUpload/NCAutoUpload.m

@@ -333,10 +333,15 @@
 
 - (void)uploadAssetsNewAndFull:(NSString *)selector
 {
-     if (!appDelegate.activeAccount || appDelegate.maintenanceMode)
+    if (!appDelegate.activeAccount || appDelegate.maintenanceMode) {
          return;
+    }
     
     tableAccount *tableAccount = [[NCManageDatabase sharedInstance] getAccountActive];
+    if (tableAccount == nil) {
+        return;
+    }
+    
     NSMutableArray *metadataFull = [NSMutableArray new];
     NSString *autoUploadPath = [[NCManageDatabase sharedInstance] getAccountAutoUploadPath:appDelegate.activeUrl];
     NSString *serverUrl;