mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-01 03:40:16 +02:00
* Potential malloc / race condition fix.
This commit is contained in:
@@ -361,6 +361,13 @@ Source::addCommand( const QSharedPointer<DatabaseCommand>& command )
|
||||
void
|
||||
Source::executeCommands()
|
||||
{
|
||||
if ( QThread::currentThread() != thread() )
|
||||
{
|
||||
tDebug() << "Reinvoking in correct thread:" << Q_FUNC_INFO;
|
||||
QMetaObject::invokeMethod( this, "executeCommands", Qt::QueuedConnection );
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !m_cmds.isEmpty() )
|
||||
{
|
||||
QList< QSharedPointer<DatabaseCommand> > cmdGroup;
|
||||
|
Reference in New Issue
Block a user