mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 07:49:42 +01:00
Lock setControlConnection to prevent races
This commit is contained in:
parent
c4ab018ae6
commit
6189326430
src/libtomahawk
@ -85,6 +85,7 @@ Source::~Source()
|
||||
bool
|
||||
Source::setControlConnection( ControlConnection* cc )
|
||||
{
|
||||
QMutexLocker locker( &m_setControlConnectionMutex );
|
||||
if ( !m_cc.isNull() && m_cc->isReady() && m_cc->isRunning() )
|
||||
{
|
||||
const QString& nodeid = Database::instance()->impl()->dbid();
|
||||
|
@ -174,6 +174,7 @@ private:
|
||||
int m_commandCount;
|
||||
QString m_lastCmdGuid;
|
||||
mutable QMutex m_cmdMutex;
|
||||
QMutex m_setControlConnectionMutex;
|
||||
|
||||
Tomahawk::playlistinterface_ptr m_playlistInterface;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user