changeset 21634:1853d9d0cc65

don't set the current tune title if it's NULL
author Ka-Hing Cheung <khc@hxbc.us>
date Mon, 26 Nov 2007 01:22:45 +0000
parents 39fb77c2986e
children dc9d0141a35f
files libpurple/protocols/jabber/google.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/google.c	Mon Nov 26 00:51:25 2007 +0000
+++ b/libpurple/protocols/jabber/google.c	Mon Nov 26 01:22:45 2007 +0000
@@ -532,6 +532,6 @@
 
 char *jabber_google_presence_outgoing(PurpleStatus *tune)
 {
-	char *ret = g_strdup_printf("♫ %s", purple_status_get_attr_string(tune, PURPLE_TUNE_TITLE));
-	return ret;
+	const char *attr = purple_status_get_attr_string(tune, PURPLE_TUNE_TITLE);
+	return attr ? g_strdup_printf("♫ %s", attr) : g_strdup("");
 }