1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-01 03:40:16 +02:00

I can haz lfranchi crash fix?

This commit is contained in:
Jeff Mitchell
2011-05-03 14:34:31 -04:00
parent e802201341
commit a8ad8cd774

View File

@@ -167,15 +167,18 @@ InfoSystemWorker::nam() const
void void
InfoSystemWorker::newNam() InfoSystemWorker::newNam()
{ {
qDebug() << Q_FUNC_INFO; qDebug() << Q_FUNC_INFO << " begin";
QNetworkAccessManager *oldNam = TomahawkUtils::nam(); QNetworkAccessManager *oldNam = TomahawkUtils::nam();
if ( oldNam && m_nam == oldNam ) if ( oldNam && oldNam->thread() == thread() )
{ {
qDebug() << Q_FUNC_INFO << " returning old nam as it's the same thread as me";
m_nam = oldNam;
emit namChanged(); emit namChanged();
return; return;
} }
qDebug() << Q_FUNC_INFO << " no nam exists, or it's a different thread, creating a new one";
QNetworkAccessManager* newNam; QNetworkAccessManager* newNam;
#ifdef LIBLASTFM_FOUND #ifdef LIBLASTFM_FOUND
newNam = new lastfm::NetworkAccessManager( this ); newNam = new lastfm::NetworkAccessManager( this );