From 21247aef248ca892766672a15fba645bf6eb2bf4 Mon Sep 17 00:00:00 2001 From: Ahmed Tarek Date: Sun, 17 Nov 2024 18:07:57 +0200 Subject: [PATCH] fix: Add check before reinitializing webview controller --- lib/resources/qubic_js.dart | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/resources/qubic_js.dart b/lib/resources/qubic_js.dart index d285b90e..08886dd9 100644 --- a/lib/resources/qubic_js.dart +++ b/lib/resources/qubic_js.dart @@ -48,6 +48,10 @@ class QubicJs { } reInitialize() async { + if (controller != null) { + debugPrint("Reinitialize skipped: Controller is still valid"); + return; + } disposeController(); await initialize(); }