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:
committed by
Michael Zanetti
parent
bc94658e56
commit
6726c7fcf0
@@ -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();
|
||||
}
|
||||
|
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user