Fix a crash when clearing a playlist

This commit is contained in:
David Sansome 2010-06-18 16:06:51 +00:00
parent 47790e9099
commit b18fcee586
1 changed files with 3 additions and 0 deletions

View File

@ -203,6 +203,9 @@ void PlaylistManager::UpdateSummaryText() {
// Get the length of the selected tracks
foreach (const QItemSelectionRange& range, current_selection_) {
if (!range.isValid())
continue;
selected += range.bottom() - range.top() + 1;
for (int i=range.top() ; i<=range.bottom() ; ++i) {
int length = range.model()->index(i, Playlist::Column_Length).data().toInt();