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