don't try set filter if webview already deleted
https://anki.tenderapp.com/discussions/add-ons/32496-add-on-error
This commit is contained in:
parent
1fc480e8f4
commit
eef86bf37e
@ -348,14 +348,14 @@ body {{ zoom: {}; background: {}; {} }}
|
||||
return False
|
||||
|
||||
def _onBridgeCmd(self, cmd):
|
||||
if not self._filterSet:
|
||||
self.focusProxy().installEventFilter(self)
|
||||
self._filterSet = True
|
||||
|
||||
if self._shouldIgnoreWebEvent():
|
||||
print("ignored late bridge cmd", cmd)
|
||||
return
|
||||
|
||||
if not self._filterSet:
|
||||
self.focusProxy().installEventFilter(self)
|
||||
self._filterSet = True
|
||||
|
||||
if cmd == "domDone":
|
||||
self._domDone = True
|
||||
self._maybeRunActions()
|
||||
|
Loading…
Reference in New Issue
Block a user