rendered paste bodydiff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.cindex 5b3b325..877bf1d 100644--- a/src/itdb_sqlite.c+++ b/src/itdb_sqlite.c@@ -742,7 +742,11 @@ 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; }