changeset 4744:89891f400f98

Patch from Steve Cotton <steve0001@s.cotton.clara.co.uk> 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.
author William Pitcock <nenolod@atheme.org>
date Mon, 28 Jul 2008 11:34:39 -0500
parents 7453f5365b8c
children 34e0d0de2018
files src/audacious/playlist.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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;
                 }
             }