rendered paste bodydiff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.cindex 5b3b325..4ad4122 100644--- a/src/itdb_sqlite.c+++ b/src/itdb_sqlite.c@@ -742,13 +742,21 @@ static int mk_Library(Itdb_iTunesDB *itdb, else sqlite3_bind_int(stmt_item, ++idx, 0); /* album_pid -7670716306765259718 */- this_album = g_hash_table_lookup(album_ids, track);+ if (track->album != NULL) {+ this_album = g_hash_table_lookup(album_ids, track);+ } else {+ this_album = NULL;+ } if (this_album) { album_pid = this_album->sql_id; } sqlite3_bind_int64(stmt_item, ++idx, album_pid); /* artist_pid -7576753259813584028 */- this_artist = g_hash_table_lookup(artist_ids, track);+ if (track->artist != NULL) {+ this_artist = g_hash_table_lookup(artist_ids, track);+ } else {+ this_artist = NULL;+ } if (this_artist) { artist_pid = this_artist->sql_id; }