[gaim-migrate @ 7900]

Wed, 22 Oct 2003 16:38:37 +0000

author
Nathan Walp <nwalp@pidgin.im>
date
Wed, 22 Oct 2003 16:38:37 +0000
changeset 7316
60ea2e0f1a97
parent 7315
ef53e64f20bf
child 7317
c73ce1df50f8

[gaim-migrate @ 7900]
this _might_ fix empty group names (it at least shouldn't crash)

src/protocols/jabber/roster.c file | annotate | diff | comparison | revisions
--- a/src/protocols/jabber/roster.c	Wed Oct 22 15:52:46 2003 +0000
+++ b/src/protocols/jabber/roster.c	Wed Oct 22 16:38:37 2003 +0000
@@ -193,10 +193,13 @@
 			GSList *groups = NULL;
 
 			for(group = item->child; group; group = group->next) {
+				char *group_name;
 				if(group->type != NODE_TYPE_TAG || strcmp(group->name, "group"))
 					continue;
-				groups = g_slist_append(groups,
-						xmlnode_get_data(group));
+
+				if(!(group_name = xmlnode_get_data(group)))
+					group_name = g_strdup("");
+				groups = g_slist_append(groups, group_name);
 			}
 			add_gaim_buddies_in_groups(js, jid, name, groups);
 		}

mercurial