From 1d4ca34ca698079151aa68915f8bd3bf0c11e3cc Mon Sep 17 00:00:00 2001 From: SomberNight Date: Fri, 8 Jun 2018 20:29:07 +0200 Subject: [PATCH] kivy: fix potential crash in on_resume happened for me at least once, but for some reason kivy actually "ignored the exception", and simply printed a long trace into logcat, starting with: WARNING:kivy:stderr: Exception ignored in: 'kivy.core.window._window_sdl2._WindowSDL2Storage.cb_event_filter' --- gui/kivy/main_window.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gui/kivy/main_window.py b/gui/kivy/main_window.py index f46cb3581..751ebfa55 100644 --- a/gui/kivy/main_window.py +++ b/gui/kivy/main_window.py @@ -709,7 +709,7 @@ class ElectrumWindow(App): def on_resume(self): now = time.time() - if self.wallet.has_password and now - self.pause_time > 60: + if self.wallet and self.wallet.has_password and now - self.pause_time > 60: self.password_dialog(self.wallet, _('Enter PIN'), None, self.stop) if self.nfcscanner: self.nfcscanner.nfc_enable()