Pārlūkot izejas kodu

check if mounted

ashilkn 2 gadi atpakaļ
vecāks
revīzija
2fe80cee31
1 mainītis faili ar 3 papildinājumiem un 1 dzēšanām
  1. 3 1
      lib/ui/viewer/file/file_caption_widget.dart

+ 3 - 1
lib/ui/viewer/file/file_caption_widget.dart

@@ -56,7 +56,9 @@ class _FileCaptionWidgetState extends State<FileCaptionWidget> {
           final isSuccesful =
               await editFileCaption(context, widget.file, editedCaption);
           if (isSuccesful) {
-            Navigator.pop(context);
+            if (mounted) {
+              Navigator.pop(context);
+            }
           }
         }
       },