1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 07:49:42 +01:00

* Prevent race condition when cloning DatabaseImpls.

This commit is contained in:
Christian Muehlhaeuser 2012-06-07 13:32:54 +02:00
parent 2389770d8a
commit aadd7fea2b
2 changed files with 3 additions and 0 deletions

View File

@ -131,6 +131,8 @@ DatabaseImpl::~DatabaseImpl()
DatabaseImpl*
DatabaseImpl::clone() const
{
QMutexLocker lock( &m_mutex );
DatabaseImpl* impl = new DatabaseImpl( m_parent, m_db.databaseName() );
impl->setDatabaseID( m_dbid );
impl->setFuzzyIndex( m_fuzzyIndex );

View File

@ -101,6 +101,7 @@ private:
QString m_dbid;
FuzzyIndex* m_fuzzyIndex;
mutable QMutex m_mutex;
};
#endif // DATABASEIMPL_H