From 872cff2ae18b908a4c4c2f6f6ffa1a5911b98729 Mon Sep 17 00:00:00 2001 From: Marc Jauvin Date: Fri, 16 Feb 2018 14:03:11 -0500 Subject: [PATCH] make sure tab is not None either, had a crash because of this --- qutebrowser/mainwindow/tabbedbrowser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 00da9ea86..389cc1dc4 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -638,7 +638,7 @@ class TabbedBrowser(tabwidget.TabWidget): if (mode in input_modes and config.val.tabs.mode_on_change == 'restore'): tab = self.currentWidget() - if tab != 0: + if tab and tab is not None: tab.data.input_mode = mode @pyqtSlot(usertypes.KeyMode) @@ -654,7 +654,7 @@ class TabbedBrowser(tabwidget.TabWidget): widget.setFocus() elif config.val.tabs.mode_on_change == 'restore': tab = self.currentWidget() - if tab != 0: + if tab and tab is not None: tab.data.input_mode = usertypes.KeyMode.normal @pyqtSlot(int)