1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-20 15:59:42 +01:00

Don't create QNRs for null urls, let audioengine handle it properly

This commit is contained in:
Leo Franchi 2011-11-13 22:28:02 -05:00
parent ba8cfc3e91
commit 6e176c77a6

View File

@ -173,6 +173,10 @@ QtScriptResolverHelper::customIODeviceFactory( const Tomahawk::result_ptr& resul
.arg( QString( QUrl( result->url() ).toEncoded() ) );
QString urlStr = m_resolver->m_engine->mainFrame()->evaluateJavaScript( getUrl ).toString();
if ( urlStr.isEmpty() )
return QSharedPointer< QIODevice >();
QUrl url = QUrl::fromEncoded( urlStr.toUtf8() );
QNetworkRequest req( url );
tDebug() << "Creating a QNetowrkReply with url:" << req.url().toString();