From b0cfb281f43c5e269bf5dc37e455653fce14c381 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sat, 2 Aug 2014 01:12:05 +0200 Subject: [PATCH] shutdown correctly before mainwindow exists. --- qutebrowser/app.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/qutebrowser/app.py b/qutebrowser/app.py index 0d4d6b322..94dbbea49 100644 --- a/qutebrowser/app.py +++ b/qutebrowser/app.py @@ -693,8 +693,9 @@ class Application(QApplication): log.destroy.debug("Removing eventfilter...") self.removeEventFilter(self.modeman) # Close all tabs - log.destroy.debug("Closing tabs...") - self.mainwindow.tabs.shutdown() + if self.mainwindow is not None: + log.destroy.debug("Closing tabs...") + self.mainwindow.tabs.shutdown() # Save everything if hasattr(self, 'config') and self.config is not None: to_save = []