diff src/protocols/jabber/roster.c @ 7316:5b408a3fc6f4

[gaim-migrate @ 7900] this _might_ fix empty group names (it at least shouldn't crash) committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 22 Oct 2003 16:38:37 +0000
parents dd4b4a187171
children 85cd2e71bff7
line wrap: on
line diff
--- 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);
 		}