From 0c6cf467fe04d1da2eab400e6830e70f258d5b19 Mon Sep 17 00:00:00 2001 From: stopflock Date: Sun, 26 Jul 2026 04:05:54 -0500 Subject: [PATCH] add trap for potential async context issue found by linter --- .../settings/sections/enable_offline_features_section.dart | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/screens/settings/sections/enable_offline_features_section.dart b/lib/screens/settings/sections/enable_offline_features_section.dart index b7d283e..8cd8aa0 100644 --- a/lib/screens/settings/sections/enable_offline_features_section.dart +++ b/lib/screens/settings/sections/enable_offline_features_section.dart @@ -25,6 +25,7 @@ class EnableOfflineFeaturesSection extends StatelessWidget { // no "cancel" path once this dialog is shown. final offlineService = OfflineAreaService(); await offlineService.ensureInitialized(); + if (!context.mounted) return; final hasExistingAreas = offlineService.offlineAreas.isNotEmpty; if (!hasExistingAreas) {