1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-25 23:06:23 +02:00

* Mutex protect hash access.

This commit is contained in:
Christian Muehlhaeuser
2012-07-21 14:14:45 +02:00
parent 95b43964df
commit ee2670b813
2 changed files with 14 additions and 8 deletions

View File

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

View File

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