mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-07 14:46:33 +02:00
* Potential malloc / race condition fix.
This commit is contained in:
@@ -361,6 +361,13 @@ Source::addCommand( const QSharedPointer<DatabaseCommand>& command )
|
|||||||
void
|
void
|
||||||
Source::executeCommands()
|
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() )
|
if ( !m_cmds.isEmpty() )
|
||||||
{
|
{
|
||||||
QList< QSharedPointer<DatabaseCommand> > cmdGroup;
|
QList< QSharedPointer<DatabaseCommand> > cmdGroup;
|
||||||
|
Reference in New Issue
Block a user