All pastes #1640959 Raw Edit

teuf

public text v1 · immutable
#1640959 ·published 2009-10-24 00:03 UTC
rendered paste body
diff --git a/src/itdb_sqlite.c b/src/itdb_sqlite.cindex 5f05b57..ecfa5f3 100644--- a/src/itdb_sqlite.c+++ b/src/itdb_sqlite.c@@ -637,9 +637,11 @@ static void mk_Library(Itdb_iTunesDB *itdb, 	    else 		sqlite3_bind_int(stmt, ++idx, 0); 	    /* album_pid -7670716306765259718 */-	    this_album = g_hash_table_lookup(album_ids, track);-	    if (this_album) {-		album_pid = this_album->sql_id;+	    if (track->album) {+		this_album = g_hash_table_lookup(album_ids, track);+		if (this_album) {+		    album_pid = this_album->sql_id;+		} 	    } 	    sqlite3_bind_int64(stmt, ++idx, album_pid); 	    /* artist_pid -7576753259813584028 */