changeset 474:f5191cefba2a trunk

[svn] - fix weird "(null) (Radioseven - www.radioseven.se)" glitch
author nenolod
date Sun, 21 Jan 2007 02:21:50 -0800
parents e1e98289c1ab
children 90e4ac2189fe
files ChangeLog src/mpg123/mpg123.c
diffstat 2 files changed, 18 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Jan 21 02:18:37 2007 -0800
+++ b/ChangeLog	Sun Jan 21 02:21:50 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-21 10:18:37 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [1032]
+  - use g_new0
+  
+  trunk/src/curl/curl.c |    4 ++--
+  1 file changed, 2 insertions(+), 2 deletions(-)
+
+
 2007-01-21 10:16:17 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [1030]
   - stuff from vfs_get_metadata is already strdup'd
--- a/src/mpg123/mpg123.c	Sun Jan 21 02:18:37 2007 -0800
+++ b/src/mpg123/mpg123.c	Sun Jan 21 02:21:50 2007 -0800
@@ -872,11 +872,18 @@
 
 		    if (old_title == NULL || g_strcasecmp(old_title, new_title))
                     {
-			g_free(mpgdec_title);
-			mpgdec_title = g_strdup_printf("%s (%s)", 
+			if (mpgdec_title != NULL)
+				g_free(mpgdec_title);
+
+			if (new_title != NULL)
+				mpgdec_title = g_strdup_printf("%s (%s)", 
 							new_title, srv_name);
+			else
+				mpgdec_title = g_strdup(srv_name);
 
-			g_free(old_title);
+			if (old_title != NULL)
+				g_free(old_title);
+	
 			old_title = new_title;
 
 			g_free(srv_name);