From d87a255c0a0d0fa3c782f209b9816b09d7b8ab91 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 17 Aug 2016 15:24:10 +0200 Subject: [PATCH] Don't fully clean up labels if their frame is gone Otherwise they're invalid but still in the HintContext, so calling .hide() on it later (e.g. because the user pressed another key) would give us a RuntimeError from PyQt. --- qutebrowser/browser/hints.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qutebrowser/browser/hints.py b/qutebrowser/browser/hints.py index 93c3d00d1..6f575bf2c 100644 --- a/qutebrowser/browser/hints.py +++ b/qutebrowser/browser/hints.py @@ -121,7 +121,7 @@ class HintLabel(QLabel): log.hints.debug("Contents size changed...!") if self.elem.frame() is None: # This sometimes happens for some reason... - self.cleanup() + self.hide() else: self._move_to_elem()