From b0213b9fd77d454647f9d70af6e4cefc688230de Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 7 Aug 2017 13:12:47 +1000 Subject: [PATCH] ignore webchannel events received after webview deleted thanks to David for the report --- aqt/webview.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/aqt/webview.py b/aqt/webview.py index 31022ff96..4f1d3c814 100644 --- a/aqt/webview.py +++ b/aqt/webview.py @@ -224,6 +224,11 @@ body { zoom: %f; %s } openLink(url) def _onBridgeCmd(self, cmd): + # ignore webchannel messages that arrive after underlying webview + # deleted + if sip.isdeleted(self): + return + if cmd == "domDone": self._domDone = True # run through any pending js calls