mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-06 14:16:32 +02:00
* Prevent dead-locking.
This commit is contained in:
@@ -438,10 +438,15 @@ Source::executeCommands()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QMutexLocker lock( &m_cmdMutex );
|
bool commandsAvail = false;
|
||||||
|
|
||||||
if ( !m_cmds.isEmpty() )
|
|
||||||
{
|
{
|
||||||
|
QMutexLocker lock( &m_cmdMutex );
|
||||||
|
commandsAvail = !m_cmds.isEmpty();
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( commandsAvail )
|
||||||
|
{
|
||||||
|
QMutexLocker lock( &m_cmdMutex );
|
||||||
QList< QSharedPointer<DatabaseCommand> > cmdGroup;
|
QList< QSharedPointer<DatabaseCommand> > cmdGroup;
|
||||||
QSharedPointer<DatabaseCommand> cmd = m_cmds.takeFirst();
|
QSharedPointer<DatabaseCommand> cmd = m_cmds.takeFirst();
|
||||||
while ( cmd->groupable() )
|
while ( cmd->groupable() )
|
||||||
|
Reference in New Issue
Block a user