1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-14 18:14:50 +02:00

Don't create a ResultUrlChecker if there are no results to be checked.

This commit is contained in:
Christian Muehlhaeuser
2015-04-23 20:53:45 +02:00
parent 495fd028c1
commit e65830643b

View File

@@ -354,7 +354,7 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
QList< result_ptr > httpResults;
foreach ( const result_ptr& r, results )
{
if ( r.isNull() )
if ( !r )
continue;
if ( !r->checked() && ( r->url().startsWith( "http" ) && !r->url().startsWith( "http://localhost" ) ) )
@@ -363,8 +363,11 @@ Pipeline::reportResults( QID qid, const QList< result_ptr >& results )
cleanResults << r;
}
if ( !httpResults.isEmpty() )
{
const ResultUrlChecker* checker = new ResultUrlChecker( q, httpResults );
connect( checker, SIGNAL( done() ), SLOT( onResultUrlCheckerDone() ) );
}
addResultsToQuery( q, cleanResults );
/* if ( q->solved() && !q->isFullTextQuery() )