From bcee6d295c6bf3661a222e556b5d7a9dc75085ca Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 27 Mar 2017 07:52:33 +0200 Subject: [PATCH] Handle None-widget in tabbedbrowser.widgets() I can't reproduce this, but got a crash report about it. --- qutebrowser/mainwindow/tabbedbrowser.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/qutebrowser/mainwindow/tabbedbrowser.py b/qutebrowser/mainwindow/tabbedbrowser.py index 60df43f9d..f56bfc5a6 100644 --- a/qutebrowser/mainwindow/tabbedbrowser.py +++ b/qutebrowser/mainwindow/tabbedbrowser.py @@ -146,10 +146,14 @@ class TabbedBrowser(tabwidget.TabWidget): We don't implement this as generator so we can delete tabs while iterating over the list. """ - w = [] + widgets = [] for i in range(self.count()): - w.append(self.widget(i)) - return w + widget = self.widget(i) + if widget is None: + log.webview.debug("Got None-widget in tabbedbrowser!") + else: + widgets.append(widget) + return widgets @config.change_filter('ui', 'window-title-format') def update_window_title(self):