Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Guard selection download after dispose

Neeraj Gupta6c4b068b3c00
diff --git a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
index 2a40dce302..53700db4c1 100644
--- a/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
+++ b/mobile/apps/photos/lib/ui/viewer/actions/file_selection_actions_widget.dart
@@ -1144,6 +1144,7 @@ class _FileSelectionActionsWidgetState
addedToQueueCount = enqueueResult.addedCount;
} catch (e) {
_logger.warning("Failed to enqueue files for download", e);
+ if (!mounted) return;
await showGenericErrorDialog(context: context, error: e);
return;
}
@@ -1197,6 +1198,7 @@ class _FileSelectionActionsWidgetState
}
}
+ if (!mounted) return;
if (skippedFilesCount > 0) {
String finalMessage;
if (skippedFilesCount == 1) {