mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-07-31 11:20:22 +02:00
* Prevent race condition when cloning DatabaseImpls.
This commit is contained in:
@@ -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 );
|
||||
|
@@ -101,6 +101,7 @@ private:
|
||||
|
||||
QString m_dbid;
|
||||
FuzzyIndex* m_fuzzyIndex;
|
||||
mutable QMutex m_mutex;
|
||||
};
|
||||
|
||||
#endif // DATABASEIMPL_H
|
||||
|
Reference in New Issue
Block a user