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