Handle None-widget in tabbedbrowser.widgets()

I can't reproduce this, but got a crash report about it.
This commit is contained in:
Florian Bruhin 2017-03-27 07:52:33 +02:00
parent 5a4d11be68
commit bcee6d295c

View File

@ -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):