From d0c2ce276a0bde6abf748cf42150000477ed5275 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 30 Sep 2015 11:40:33 +0200 Subject: [PATCH] Application: Fix crash on early shutdown #3898 --- src/gui/application.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/application.cpp b/src/gui/application.cpp index 3e5148abd..e5bf78777 100644 --- a/src/gui/application.cpp +++ b/src/gui/application.cpp @@ -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(); -- 2.39.5