mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-19 15:29:42 +01:00
Only delete AtticaManager if ever created
This commit is contained in:
parent
48a40c314b
commit
7845224bba
@ -79,6 +79,20 @@ public:
|
||||
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 );
|
||||
virtual ~AtticaManager();
|
||||
|
||||
|
@ -302,7 +302,7 @@ TomahawkApp::~TomahawkApp()
|
||||
delete m_scanManager.data();
|
||||
|
||||
delete Tomahawk::Accounts::AccountManager::instance();
|
||||
delete AtticaManager::instance();
|
||||
AtticaManager::deleteInstace();
|
||||
delete m_mainwindow;
|
||||
|
||||
// Main Window uses the AudioEngine, so delete it later.
|
||||
|
Loading…
x
Reference in New Issue
Block a user