]> git.proxmox.com Git - flutter/proxmox_login_manager.git/commitdiff
login form: check if build context is still valid after async call
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 16 Apr 2024 14:41:14 +0000 (16:41 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Tue, 16 Apr 2024 14:41:34 +0000 (16:41 +0200)
Fixes: 1531412 ("login: show custom alert dialog for password saving errors")
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
lib/proxmox_login_form.dart

index 4b34e40783f87aaf1e8ed8fc9e58603af41e9b62..6db841726e019e918cc0476831296743fd1eb1c3 100644 (file)
@@ -534,6 +534,7 @@ class _ProxmoxLoginPageState extends State<ProxmoxLoginPage> {
             await deletePassword(id);
           }
         } catch (e) {
+          if (!mounted) return;
           await showDialog(
               context: context,
               builder: (context) => AlertDialog(