# HG changeset patch # User Sadrul Habib Chowdhury # Date 1200093676 0 # Node ID 83613550512b712729fff13a22e30088140ab14a # Parent fdebef95b3007b776575d49236c752333e83724d Ignore both NULL and empty strings. diff -r fdebef95b300 -r 83613550512b libpurple/util.c --- a/libpurple/util.c Thu Jan 10 02:28:48 2008 +0000 +++ b/libpurple/util.c Fri Jan 11 23:21:16 2008 +0000 @@ -4659,7 +4659,7 @@ GString *string; char *esc; - if (!title) + if (!title || !*title) return NULL; esc = g_markup_escape_text(title, -1); @@ -4667,13 +4667,13 @@ g_string_append_printf(string, "%s", esc); g_free(esc); - if (artist) { + if (artist && *artist) { esc = g_markup_escape_text(artist, -1); g_string_append_printf(string, _(" - %s"), esc); g_free(esc); } - if (album) { + if (album && *album) { esc = g_markup_escape_text(album, -1); g_string_append_printf(string, _(" (%s)"), esc); g_free(esc);