فهرست منبع

Add null check

Vishnu Mohandas 4 سال پیش
والد
کامیت
304ec1806c
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  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"];