Skip to content

Commit

Permalink
Ignore TypeError on contents_size_changed cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
The-Compiler committed Aug 1, 2016
1 parent 81d0d64 commit 49699be
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions qutebrowser/browser/hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 49699be

Please sign in to comment.