Don't try to set focus if prev_focus is None

This commit is contained in:
Florian Bruhin 2018-06-21 01:44:15 +02:00
parent e7a300865c
commit 9f5ca475c9

View File

@ -506,6 +506,7 @@ class TabbedBrowser(QWidget):
usertypes.KeyMode.yesno]:
# If we were in a command prompt, restore old focus
# The above commands need to be run to switch tabs
if prev_focus is not None:
prev_focus.setFocus()
tab.show()