Fix a crash when clearing a playlist
This commit is contained in:
parent
47790e9099
commit
b18fcee586
@ -203,6 +203,9 @@ void PlaylistManager::UpdateSummaryText() {
|
|||||||
|
|
||||||
// Get the length of the selected tracks
|
// Get the length of the selected tracks
|
||||||
foreach (const QItemSelectionRange& range, current_selection_) {
|
foreach (const QItemSelectionRange& range, current_selection_) {
|
||||||
|
if (!range.isValid())
|
||||||
|
continue;
|
||||||
|
|
||||||
selected += range.bottom() - range.top() + 1;
|
selected += range.bottom() - range.top() + 1;
|
||||||
for (int i=range.top() ; i<=range.bottom() ; ++i) {
|
for (int i=range.top() ; i<=range.bottom() ; ++i) {
|
||||||
int length = range.model()->index(i, Playlist::Column_Length).data().toInt();
|
int length = range.model()->index(i, Playlist::Column_Length).data().toInt();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user