mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-08-19 12:21:52 +02:00
Only start track from the correct thread
This commit is contained in:
@@ -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 )
|
||||
{
|
||||
|
Reference in New Issue
Block a user