1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-09-02 18:33:16 +02:00

* Mutex protect hash access.

This commit is contained in:
Christian Muehlhaeuser
2012-07-21 14:14:45 +02:00
committed by Michael Zanetti
parent aaa0affad4
commit 667feee3cc
2 changed files with 14 additions and 8 deletions

View File

@@ -320,10 +320,13 @@ Album::infoSystemInfo( const Tomahawk::InfoSystem::InfoRequestData& requestData,
m_coverBuffer = ba;
}
m_coverLoaded = true;
s_albumsByCoverId.remove( coverId() );
m_coverId = uuid();
s_albumsByCoverId[ m_coverId ] = m_ownRef.toStrongRef();
{
QMutexLocker lock( &s_mutex );
m_coverLoaded = true;
s_albumsByCoverId.remove( coverId() );
m_coverId = uuid();
s_albumsByCoverId[ m_coverId ] = m_ownRef.toStrongRef();
}
emit coverChanged();
}
}

View File

@@ -454,10 +454,13 @@ Artist::infoSystemInfo( Tomahawk::InfoSystem::InfoRequestData requestData, QVari
m_coverBuffer = ba;
}
m_coverLoaded = true;
s_artistsByCoverId.remove( coverId() );
m_coverId = uuid();
s_artistsByCoverId[ m_coverId ] = m_ownRef.toStrongRef();
{
QMutexLocker lock( &s_mutex );
m_coverLoaded = true;
s_artistsByCoverId.remove( coverId() );
m_coverId = uuid();
s_artistsByCoverId[ m_coverId ] = m_ownRef.toStrongRef();
}
emit coverChanged();
}