diff --git a/qutebrowser/browser/webkit/webkitelem.py b/qutebrowser/browser/webkit/webkitelem.py index b0ee4f89c..6ce4e9292 100644 --- a/qutebrowser/browser/webkit/webkitelem.py +++ b/qutebrowser/browser/webkit/webkitelem.py @@ -148,7 +148,7 @@ class WebKitElement(webelem.AbstractWebElement): def parent(self): self._check_vanished() elem = self._elem.parent() - if elem is None: + if elem is None or elem.isNull(): return None return WebKitElement(elem, tab=self._tab)