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:
@@ -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() )
|
||||
|
Reference in New Issue
Block a user