diff --git a/lib/services/local/local_sync_util.dart b/lib/services/local/local_sync_util.dart index 47be828a4..662ab9895 100644 --- a/lib/services/local/local_sync_util.dart +++ b/lib/services/local/local_sync_util.dart @@ -193,6 +193,10 @@ Future> _convertLocalAssetsToUniqueFiles( for (final String localID in localPathAsset.localIDs) { if (!alreadySeenLocalIDs.contains(localID)) { final assetEntity = await AssetEntity.fromId(localID); + if (assetEntity == null) { + _logger.warning('Failed to fetch asset with id $localID'); + continue; + } files.add( await File.fromAsset(localPathName, assetEntity), );