From 85825bdc2c15a4e7f5f4b3ad8b01ff2ac022f385 Mon Sep 17 00:00:00 2001 From: Ivar Derksen Date: Tue, 12 Dec 2023 12:05:31 +0100 Subject: [PATCH] Fix: _onErrorEvent on SchemeManagementScheme using unmounted context --- .../debug/scheme_management/scheme_management_screen.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/src/screens/debug/scheme_management/scheme_management_screen.dart b/lib/src/screens/debug/scheme_management/scheme_management_screen.dart index 493ff9d7..cd031f69 100644 --- a/lib/src/screens/debug/scheme_management/scheme_management_screen.dart +++ b/lib/src/screens/debug/scheme_management/scheme_management_screen.dart @@ -50,6 +50,8 @@ class _SchemeManagementScreenState extends State { // ErrorEvents are automatically reported by the IrmaRepository if error reporting is enabled. final errorReported = await IrmaRepositoryProvider.of(context).preferences.getReportErrors().first; + if (!mounted) return; + navigator.push( MaterialPageRoute( builder: (context) => ErrorScreen.fromEvent(