From b3ddab132052888575e745a0013fa4b028463a84 Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sat, 22 Jun 2013 20:08:11 +0200 Subject: [PATCH] Delete AudioEngine after MainWindow --- src/tomahawk/TomahawkApp.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/tomahawk/TomahawkApp.cpp b/src/tomahawk/TomahawkApp.cpp index bcaecb386..831248c55 100644 --- a/src/tomahawk/TomahawkApp.cpp +++ b/src/tomahawk/TomahawkApp.cpp @@ -285,9 +285,6 @@ TomahawkApp::~TomahawkApp() if ( !m_scanManager.isNull() ) delete m_scanManager.data(); - if ( !m_audioEngine.isNull() ) - delete m_audioEngine.data(); - delete Tomahawk::Accounts::AccountManager::instance(); #ifndef ENABLE_HEADLESS @@ -295,6 +292,10 @@ TomahawkApp::~TomahawkApp() delete m_mainwindow; #endif + // Main Window uses the AudioEngine, so delete it later. + if ( !m_audioEngine.isNull() ) + delete m_audioEngine.data(); + if ( !m_database.isNull() ) delete m_database.data();