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:
parent
2389770d8a
commit
aadd7fea2b
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user