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

* Lock mutex when adding to the static hashes in Artist and Album.

This commit is contained in:
Christian Muehlhaeuser
2012-07-14 14:02:59 +02:00
committed by Michael Zanetti
parent bc94658e56
commit 6726c7fcf0
2 changed files with 6 additions and 0 deletions

View File

@@ -214,7 +214,10 @@ Album::id() const
m_waitingForId = false;
if ( m_id > 0 )
{
QMutexLocker lock( &s_mutex );
s_albumsById[ m_id ] = m_ownRef.toStrongRef();
}
s_idMutex.unlock();
}

View File

@@ -306,7 +306,10 @@ Artist::id() const
m_waitingForFuture = false;
if ( m_id > 0 )
{
QMutexLocker lock( &s_mutex );
s_artistsById[ m_id ] = m_ownRef.toStrongRef();
}
s_idMutex.unlock();
}