1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-03-18 23:09:42 +01:00

Fix crash on misbehaving VA albums

This commit is contained in:
Uwe L. Korn 2014-06-01 20:05:36 +01:00
parent 804b5e7ed8
commit c56d5b90dc

View File

@ -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++ ) {