Check if currentFrame() is None when starting hints

This commit is contained in:
Florian Bruhin 2014-04-25 13:21:14 +02:00
parent 0a710ab18a
commit bc077f7503

View File

@ -194,8 +194,11 @@ class CurCommandDispatcher(QObject):
target: Where to open the links.
"""
widget = self._tabs.currentWidget()
widget.hintmanager.start(widget.page_.currentFrame(), widget.url(),
mode, target)
frame = widget.page_.currentFrame()
if frame is None:
message.error("No frame focused!")
else:
widget.hintmanager.start(frame, widget.url(), mode, target)
@pyqtSlot(str)
def handle_hint_key(self, keystr):