From e3425cfa9e0b46b2b4665e5594f603dd036f14ce Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sat, 18 Jun 2022 04:36:00 +0800 Subject: [PATCH] Defer closing logger instance So that logger can still be used in shutdown stage. --- src/app/application.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/application.cpp b/src/app/application.cpp index ea82b27c2..b244bc4f5 100644 --- a/src/app/application.cpp +++ b/src/app/application.cpp @@ -850,12 +850,13 @@ void Application::cleanup() Net::ProxyConfigurationManager::freeInstance(); Preferences::freeInstance(); SettingsStorage::freeInstance(); - delete m_fileLogger; - Logger::freeInstance(); IconProvider::freeInstance(); SearchPluginManager::freeInstance(); Utils::Fs::removeDirRecursively(Utils::Fs::tempPath()); + Logger::freeInstance(); + delete m_fileLogger; + #ifndef DISABLE_GUI if (m_window) {