1
0
mirror of https://github.com/clementine-player/Clementine synced 2024-12-15 18:58:55 +01:00

Fix segfault when a song's tag has changed inbetween runs

This commit is contained in:
David Sansome 2010-03-21 14:47:59 +00:00
parent cbb41cab46
commit 56fb0663ee

View File

@ -108,7 +108,7 @@ void Library::SongsDiscovered(const SongList& songs) {
album = artist->ChildByKey(song.album()); album = artist->ChildByKey(song.album());
if (album == NULL) if (album == NULL)
album = CreateAlbumNode(true, song.album(), artist, song.is_compilation(), album = CreateAlbumNode(true, song.album(), artist, song.is_compilation(),
song.art_automatic(), song.art_manual(), album->artist); song.art_automatic(), song.art_manual(), artist->key);
if (album->lazy_loaded) if (album->lazy_loaded)
CreateSongNode(true, song, album); CreateSongNode(true, song, album);
@ -194,7 +194,7 @@ LibraryItem* Library::CreateAlbumNode(bool signal, const QString& name,
if (!art_automatic.isNull() && ret->cover_art.isNull()) if (!art_automatic.isNull() && ret->cover_art.isNull())
ret->cover_art.load(art_automatic);*/ ret->cover_art.load(art_automatic);*/
ret->artist = compilation ? QString::null : artist; ret->artist = compilation ? QString() : artist;
if (signal) if (signal)
endInsertRows(); endInsertRows();