mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-03-20 15:59:42 +01:00
* Potential malloc / race condition fix.
This commit is contained in:
parent
14fd0424a1
commit
ba74c22663
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user