Fix crash when executing "qutebrowser :set".

Fixes #720.
See #721.
This commit is contained in:
Martin Tournoij 2015-06-01 19:02:07 +02:00 committed by Florian Bruhin
parent b5a70dbdec
commit e22ef776f9

View File

@ -296,7 +296,7 @@ class TabbedBrowser(tabwidget.TabWidget):
newtab: True to open URL in a new tab, False otherwise. newtab: True to open URL in a new tab, False otherwise.
""" """
qtutils.ensure_valid(url) qtutils.ensure_valid(url)
if newtab: if newtab or self.currentWidget() is None:
self.tabopen(url, background=False) self.tabopen(url, background=False)
else: else:
self.currentWidget().openurl(url) self.currentWidget().openurl(url)