diff --git a/src/TomahawkApp.cpp b/src/TomahawkApp.cpp index 1f14126bf..cf8f1e795 100644 --- a/src/TomahawkApp.cpp +++ b/src/TomahawkApp.cpp @@ -380,11 +380,10 @@ TomahawkApp::~TomahawkApp() delete m_audioEngine.data(); delete Tomahawk::Accounts::AccountManager::instance(); - delete TomahawkUtils::Cache::instance(); #ifndef ENABLE_HEADLESS - delete m_mainwindow; delete AtticaManager::instance(); + delete m_mainwindow; #endif if ( !m_database.isNull() ) @@ -395,6 +394,8 @@ TomahawkApp::~TomahawkApp() if ( !m_infoSystem.isNull() ) delete m_infoSystem.data(); + delete TomahawkUtils::Cache::instance(); + tLog() << "Finished shutdown."; }