diff --git a/qutebrowser/widgets/statusbar/progress.py b/qutebrowser/widgets/statusbar/progress.py index 7a8e8abac..90d7b0867 100644 --- a/qutebrowser/widgets/statusbar/progress.py +++ b/qutebrowser/widgets/statusbar/progress.py @@ -67,6 +67,10 @@ class Progress(QProgressBar): @pyqtSlot(int) def on_tab_changed(self, tab): """Set the correct value when the current tab changed.""" + if self is None: + # This should never happen, but for some weird reason it does + # sometimes. + return self.setValue(tab.progress) if tab.load_status == LoadStatus.loading: self.show()