1
0
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:
Uwe L. Korn 2014-08-22 22:36:13 +01:00
parent 48a40c314b
commit 7845224bba
2 changed files with 15 additions and 1 deletions

View File

@ -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();

View File

@ -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.