From c56d5b90dcf1884b88bd98021634099983fc8f3e Mon Sep 17 00:00:00 2001 From: "Uwe L. Korn" Date: Sun, 1 Jun 2014 20:05:36 +0100 Subject: [PATCH] Fix crash on misbehaving VA albums --- src/libtomahawk/playlist/ColumnView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libtomahawk/playlist/ColumnView.cpp b/src/libtomahawk/playlist/ColumnView.cpp index aa1fa251f..7353f46f9 100644 --- a/src/libtomahawk/playlist/ColumnView.cpp +++ b/src/libtomahawk/playlist/ColumnView.cpp @@ -510,7 +510,7 @@ ColumnView::onUpdatePreviewWidget( const QModelIndex& index ) m_previewWidget->setQuery( item->result()->toQuery() ); QList< int > widths = columnWidths(); - int previewWidth = viewport()->width() - widths.at( 0 ) - widths.at( 1 ) - widths.at( 2 ); + int previewWidth = viewport()->width(); // Sometimes we do not have 3 columns because of wrong usage of the ColumnView. // At least do not crash. for (int i = 0; i < 3 && i < widths.length(); i++ ) {