# HG changeset patch # User William Pitcock # Date 1217262879 18000 # Node ID 89891f400f9833f4d84f2aa9066b61e6afd99831 # Parent 7453f5365b8cd21dd2e840a0259217d87de17118 Patch from Steve Cotton to resolve a playlist bug where entry->tuple is NULL but we try to access it. This results in huge log files, and resolves Debian bug #491655. diff -r 7453f5365b8c -r 89891f400f98 src/audacious/playlist.c --- a/src/audacious/playlist.c Thu Jul 03 01:07:07 2008 +0200 +++ b/src/audacious/playlist.c Mon Jul 28 11:34:39 2008 -0500 @@ -2437,9 +2437,10 @@ /* Entry disappeared while we looked it up. Restart. */ node = playlist->entries; - else if ((entry->tuple != NULL || entry->title != NULL) && + else if ((entry->tuple != NULL) || + (entry->title != NULL && tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 && - tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) + tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1)) { update_playlistwin = TRUE; break; /* hmmm... --asphyx */ @@ -2488,9 +2489,10 @@ node = g_list_nth(playlist->entries, playlistwin_get_toprow()); } - else if ((entry->tuple != NULL || entry->title != NULL) && + else if ((entry->tuple != NULL) || + (entry->title != NULL && tuple_get_int(entry->tuple, FIELD_LENGTH, NULL) > -1 && - tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1) { + tuple_get_int(entry->tuple, FIELD_MTIME, NULL) != -1)) { update_playlistwin = TRUE; } }