--- a/libpurple/protocols/jabber/usermood.c Sun Jun 26 20:37:03 2011 +0000 +++ b/libpurple/protocols/jabber/usermood.c Mon Jun 27 05:24:53 2011 +0000 @@ -177,12 +177,12 @@ xmlnode_set_attrib(publish,"node","http://jabber.org/protocol/mood"); moodnode = xmlnode_new_child(xmlnode_new_child(publish, "item"), "mood"); xmlnode_set_namespace(moodnode, "http://jabber.org/protocol/mood"); - if (mood) { + if (mood && *mood) { /* if mood is NULL, set an empty mood node, meaning: unset mood */ xmlnode_new_child(moodnode, mood); } - if (text && text[0] != '\0') { + if (text && *text) { xmlnode *textnode = xmlnode_new_child(moodnode, "text"); xmlnode_insert_data(textnode, text, -1); } @@ -195,4 +195,4 @@ PurpleMood *jabber_get_moods(PurpleAccount *account) { return moods; -} \ No newline at end of file +}