mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-11 16:44:05 +02:00
Only delete AtticaManager if ever created
This commit is contained in:
@@ -79,6 +79,20 @@ public:
|
|||||||
return s_instance;
|
return s_instance;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Delete the AtticaManager if initialised.
|
||||||
|
*
|
||||||
|
* Note that <code>delete AtticaManager::instance()</code> will create an
|
||||||
|
* instance if none existed before.
|
||||||
|
*/
|
||||||
|
static void deleteInstace()
|
||||||
|
{
|
||||||
|
if ( s_instance )
|
||||||
|
{
|
||||||
|
delete s_instance;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
explicit AtticaManager ( QObject* parent = 0 );
|
explicit AtticaManager ( QObject* parent = 0 );
|
||||||
virtual ~AtticaManager();
|
virtual ~AtticaManager();
|
||||||
|
|
||||||
|
@@ -302,7 +302,7 @@ TomahawkApp::~TomahawkApp()
|
|||||||
delete m_scanManager.data();
|
delete m_scanManager.data();
|
||||||
|
|
||||||
delete Tomahawk::Accounts::AccountManager::instance();
|
delete Tomahawk::Accounts::AccountManager::instance();
|
||||||
delete AtticaManager::instance();
|
AtticaManager::deleteInstace();
|
||||||
delete m_mainwindow;
|
delete m_mainwindow;
|
||||||
|
|
||||||
// Main Window uses the AudioEngine, so delete it later.
|
// Main Window uses the AudioEngine, so delete it later.
|
||||||
|
Reference in New Issue
Block a user