1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-19 04:11:46 +02:00

Only start track from the correct thread

This commit is contained in:
Uwe L. Korn
2014-07-01 21:28:45 +01:00
parent ff89f015cd
commit 14c5a92ba2

View File

@@ -701,6 +701,16 @@ AudioEngine::performLoadIODevice( const result_ptr& result, const QString& url )
void
AudioEngine::performLoadTrack( const Tomahawk::result_ptr result, const QString url, QSharedPointer< QIODevice > io )
{
if ( QThread::currentThread() != thread() )
{
QMetaObject::invokeMethod( this, "performLoadTrack", Qt::QueuedConnection,
Q_ARG( const Tomahawk::result_ptr, result ),
Q_ARG( const QString, url ),
Q_ARG( QSharedPointer< QIODevice >, io )
);
return;
}
Q_D( AudioEngine );
if ( currentTrack() != result )
{