1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-06 06:07:37 +02:00

Make sure we only compare valid results when adding search results.

This commit is contained in:
Christian Muehlhaeuser
2014-10-25 04:29:36 +02:00
parent cea6076a83
commit b7a7e3f3bc

View File

@@ -336,7 +336,7 @@ SearchWidget::onResultsFound( const QList<Tomahawk::result_ptr>& results )
for ( int i = 0; i < m_resultsModel->rowCount( QModelIndex() ); i++ )
{
PlayableItem* item = m_resultsModel->itemFromIndex( m_resultsModel->index( i, 0, QModelIndex() ) );
if ( item && item->query() )
if ( item && item->query() && item->query()->numResults( true ) )
{
if ( item->query()->results().first()->score() < q->results().first()->score() )
{