1
0
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:
David Sansome 2012-06-04 19:13:41 +01:00
parent c62e996607
commit 00e69c341e

View File

@ -260,7 +260,12 @@ void MoodbarItemDelegate::ImageLoaded(const QUrl& url, QFutureWatcher<QImage>* w
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);
}
}