Application: Fix crash on early shutdown #3898
authorChristian Kamm <mail@ckamm.de>
Wed, 30 Sep 2015 09:40:33 +0000 (11:40 +0200)
committerChristian Kamm <mail@ckamm.de>
Wed, 30 Sep 2015 09:40:33 +0000 (11:40 +0200)
src/gui/application.cpp

index 3e5148abd3cee0c65815725f6b05d73fbf9ff3ba..e5bf78777a5f24632d559606b3a450ea2b21cd1e 100644 (file)
@@ -190,7 +190,9 @@ Application::~Application()
 {
     // Make sure all folders are gone, otherwise removing the
     // accounts will remove the associated folders from the settings.
-    FolderMan::instance()->unloadAndDeleteAllFolders();
+    if (_folderManager) {
+        _folderManager->unloadAndDeleteAllFolders();
+    }
 
     // Remove the account from the account manager so it can be deleted.
     AccountManager::instance()->shutdown();