changeset 19722:eedf2918aace

Don't put "Mood: \(null\) \(null\)" on XMPP buddies
author Sean Egan <seanegan@gmail.com>
date Mon, 10 Sep 2007 23:54:49 +0000
parents 5c419cd2cd22
children 36d5d5048b53
files libpurple/protocols/jabber/jabber.c
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/jabber.c	Mon Sep 10 23:45:51 2007 +0000
+++ b/libpurple/protocols/jabber/jabber.c	Mon Sep 10 23:54:49 2007 +0000
@@ -1427,6 +1427,7 @@
 		JabberBuddyResource *jbr = NULL;
 		const char *sub;
 		GList *l;
+		const char *mood;
 
 		if (full) {
 			PurpleStatus *status;
@@ -1452,8 +1453,7 @@
 			
 			status = purple_presence_get_active_status(purple_buddy_get_presence(b));
 			value = purple_status_get_attr_value(status, "mood");
-			if(value && purple_value_get_type(value) == PURPLE_TYPE_STRING) {
-				const char *mood = purple_value_get_string(value);
+			if (value && purple_value_get_type(value) == PURPLE_TYPE_STRING && (mood = purple_value_get_string(value))) {
 				
 				value = purple_status_get_attr_value(status, "moodtext");
 				if(value && purple_value_get_type(value) == PURPLE_TYPE_STRING) {