π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix: handle potential null collection in sync logic
Prateek Sunal24e81f9dc023
diff --git a/mobile/apps/photos/lib/services/smart_albums_service.dart b/mobile/apps/photos/lib/services/smart_albums_service.dartindex 32190530db..8c1c5c08cb 100644--- a/mobile/apps/photos/lib/services/smart_albums_service.dart+++ b/mobile/apps/photos/lib/services/smart_albums_service.dart@@ -87,9 +87,9 @@ class SmartAlbumsService {final collectionId = entry.key;final config = entry.value;final collection =- CollectionsService.instance.getCollectionByID(collectionId)!;+ CollectionsService.instance.getCollectionByID(collectionId);- if (!collection.canAutoAdd(userId!)) {+ if (!(collection?.canAutoAdd(userId!) ?? false)) {_logger.warning("Deleting collection config ($collectionId) as user does not have permission",);