Permalink
Browse files

Ignore TypeError on contents_size_changed cleanup

  • Loading branch information...
The-Compiler committed Aug 1, 2016
1 parent 81d0d64 commit 49699be44e9d9b88a8550dc9e914fb9ecce30c13
Showing with 7 additions and 2 deletions.
  1. +7 −2 qutebrowser/browser/hints.py
@@ -169,8 +169,13 @@ def _get_text(self):
def _cleanup(self):
"""Clean up after hinting."""
self._context.tab.contents_size_changed.disconnect(
self.on_contents_size_changed)
try:
self._context.tab.contents_size_changed.disconnect(
self.on_contents_size_changed)
except TypeError:
# For some reason, this can fail sometimes...
pass
for elem in self._context.all_elems:
try:
elem.label.remove_from_document()

0 comments on commit 49699be

Please sign in to comment.