changeset 24512:9a3ed3b7ac4b

Check for NULL group_id before calling msn_group_new since that function will return if you give it a NULL id. This avoids an extra debug message.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Fri, 28 Nov 2008 04:15:32 +0000
parents 7a5f6ddd11b1
children 45070d57a934
files libpurple/protocols/msn/contact.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/msn/contact.c	Mon Nov 24 06:05:01 2008 +0000
+++ b/libpurple/protocols/msn/contact.c	Fri Nov 28 04:15:32 2008 +0000
@@ -445,16 +445,16 @@
 		if ((groupInfo = xmlnode_get_child(group, "groupInfo")) && (groupname = xmlnode_get_child(groupInfo, "name")))
 			group_name = xmlnode_get_data(groupname);
 
-		msn_group_new(session->userlist, group_id, group_name);
-
-		if (group_id == NULL){
+		if (group_id == NULL) {
 			/* Group of ungroupped buddies */
 			g_free(group_name);
 			continue;
 		}
 
+		msn_group_new(session->userlist, group_id, group_name);
+
 		purple_debug_info("msn", "AB group_id: %s, name: %s\n", group_id, group_name ? group_name : "(null)");
-		if ((purple_find_group(group_name)) == NULL){
+		if ((purple_find_group(group_name)) == NULL) {
 			PurpleGroup *g = purple_group_new(group_name);
 			purple_blist_add_group(g, NULL);
 		}