1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-05 21:57:41 +02:00

Fix download all assert/crash

This commit is contained in:
Dominik Schmidt
2016-01-15 04:07:06 +01:00
parent 2020aad725
commit fc413ac103

View File

@@ -462,7 +462,9 @@ CollectionViewPage::onDownloadAll()
PlayableItem* item = m_trackView->proxyModel()->itemFromIndex( m_trackView->proxyModel()->mapToSource( m_trackView->proxyModel()->index( i, 0, QModelIndex() ) ) );
if ( !item )
continue;
if ( !DownloadManager::instance()->localFileForDownload( item->query()->results().first()->downloadFormats().first().url.toString() ).isEmpty() )
QList< DownloadFormat > formats = item->query()->results().first()->downloadFormats();
if ( formats.isEmpty() || !DownloadManager::instance()->localFileForDownload( formats.first().url.toString() ).isEmpty() )
continue;
if ( !item->result()->downloadFormats().isEmpty() )