Mercurial > pidgin
changeset 22060:83613550512b
Ignore both NULL and empty strings.
author | Sadrul Habib Chowdhury <imadil@gmail.com> |
---|---|
date | Fri, 11 Jan 2008 23:21:16 +0000 |
parents | fdebef95b300 |
children | 9bddfb6df976 |
files | libpurple/util.c |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);