Ver código fonte

Add null check

Vishnu Mohandas 4 anos atrás
pai
commit
304ec1806c
1 arquivos alterados com 2 adições e 1 exclusões
  1. 2 1
      lib/utils/file_downloader.dart

+ 2 - 1
lib/utils/file_downloader.dart

@@ -50,7 +50,8 @@ class DiffFetcher {
               file.updationTime = item["updationTime"];
               final existingFile = await FilesDB.instance
                   .getUploadedFile(file.uploadedFileID, file.collectionID);
-              if (existingFile.updationTime == file.updationTime) {
+              if (existingFile != null &&
+                  existingFile.updationTime == file.updationTime) {
                 continue;
               }
               file.ownerID = item["ownerID"];