Fix error on previewer close (#1528)

_on_close was being called twice, causing an error when the destroyed
_web is accessed again.
This commit is contained in:
Abdo 2021-12-06 12:34:41 +03:00 committed by GitHub
parent dc4fd95f24
commit 4571e78016
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -114,10 +114,6 @@ class Previewer(QDialog):
elif self._state == "answer":
replay_audio(self.card(), False)
def close(self) -> None:
self._on_close()
super().close()
def _on_close(self) -> None:
self._open = False
self._close_callback()