Handle element webFrame being None when hinting.

This commit is contained in:
Florian Bruhin 2015-03-29 19:52:30 +02:00
parent 8af2e712ae
commit b2427701fa

View File

@ -887,6 +887,10 @@ class HintManager(QObject):
Target.spawn: self._spawn,
}
elem = self._context.elems[keystr].elem
if elem.webFrame() is None:
message.error(self._win_id, "This element has no webframe.",
immediately=True)
return
if self._context.target in elem_handlers:
handler = functools.partial(
elem_handlers[self._context.target], elem, self._context)