From 6f037355a866490a1036c08adc7d77bcbf08ae33 Mon Sep 17 00:00:00 2001 From: Christian Muehlhaeuser Date: Wed, 1 Apr 2015 14:40:56 +0200 Subject: [PATCH] Fixed crash in PlaylistItemDelegate. --- src/libtomahawk/playlist/PlaylistItemDelegate.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp index 50fbd7d88..857403814 100644 --- a/src/libtomahawk/playlist/PlaylistItemDelegate.cpp +++ b/src/libtomahawk/playlist/PlaylistItemDelegate.cpp @@ -136,7 +136,7 @@ PlaylistItemDelegate::createEditor( QWidget* parent, const QStyleOptionViewItem& PlayableItem* item = m_model->itemFromIndex( m_model->mapToSource( index ) ); Q_ASSERT( item ); - if ( index.column() == PlayableModel::Download && item->result() && + if ( index.column() == PlayableModel::Download && item->result() && !item->result()->downloadFormats().isEmpty() && !DownloadManager::instance()->localFileForDownload( item->result()->downloadFormats().first().url.toString() ).isEmpty() ) { QDesktopServices::openUrl( QUrl::fromLocalFile( QFileInfo( DownloadManager::instance()->localFileForDownload( item->result()->downloadFormats().first().url.toString() ) ).absolutePath() ) );