mirror of
https://github.com/clementine-player/Clementine
synced 2024-12-17 03:45:56 +01:00
Fix a crash when switching between playlists while moodbars are loading
This commit is contained in:
parent
c62e996607
commit
00e69c341e
@ -259,8 +259,13 @@ void MoodbarItemDelegate::ImageLoaded(const QUrl& url, QFutureWatcher<QImage>* w
|
||||
if (index.model() == filter) {
|
||||
source_index = filter->mapToSource(source_index);
|
||||
}
|
||||
|
||||
Q_ASSERT(source_index.model() == playlist);
|
||||
|
||||
if (source_index.model() != playlist) {
|
||||
// The pixmap was for an index in a different playlist, maybe the user
|
||||
// switched to a different one.
|
||||
continue;
|
||||
}
|
||||
|
||||
playlist->MoodbarUpdated(source_index);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user