1
0
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:
Christian Muehlhaeuser 2012-01-16 13:33:10 +01:00
parent 14fd0424a1
commit ba74c22663

View File

@ -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;