changeset 28680:e601e2c5bb9e

merge of '4f0da4d0982e7676421da341297c5a36718765e3' and '64ef7230f0e6ed6dfeaac64c32b56f2c055ea757'
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Fri, 02 Oct 2009 13:01:28 +0000
parents a45d9f5fea69 (current diff) ec2782028fc5 (diff)
children 53bf7fd37cb0
files
diffstat 2 files changed, 13 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/finch/libgnt/gntcolors.c	Fri Oct 02 05:57:54 2009 +0000
+++ b/finch/libgnt/gntcolors.c	Fri Oct 02 13:01:28 2009 +0000
@@ -208,8 +208,10 @@
 				key = g_ascii_strdown(key, -1);
 				color = gnt_colors_get_color(key);
 				g_free(key);
-				if (color == -EINVAL)
+				if (color == -EINVAL) {
+					g_strfreev(list);
 					continue;
+				}
 
 				init_color(color, r, g, b);
 			}
@@ -251,8 +253,10 @@
 			int bg = gnt_colors_get_color(bgc);
 			g_free(fgc);
 			g_free(bgc);
-			if (fg == -EINVAL || bg == -EINVAL)
+			if (fg == -EINVAL || bg == -EINVAL) {
+				g_strfreev(list);
 				continue;
+			}
 
 			key = g_ascii_strdown(key, -1);
 
@@ -275,6 +279,7 @@
 			else if (strcmp(key, "urgent") == 0)
 				type = GNT_COLOR_URGENT;
 			else {
+				g_strfreev(list);
 				g_free(key);
 				continue;
 			}
--- a/libpurple/blist.c	Fri Oct 02 05:57:54 2009 +0000
+++ b/libpurple/blist.c	Fri Oct 02 13:01:28 2009 +0000
@@ -2009,18 +2009,14 @@
 
 	ops = purple_blist_get_ui_ops();
 
-	if (!purplebuddylist->root) {
-		purplebuddylist->root = gnode;
-
-		key = g_utf8_collate_key(group->name, -1);
-		g_hash_table_insert(groups_cache, key, group);
-		return;
+	/* if we're moving to overtop of ourselves, do nothing */
+	if (gnode == node) {
+		if (!purplebuddylist->root)
+			node = NULL;
+		else
+			return;
 	}
 
-	/* if we're moving to overtop of ourselves, do nothing */
-	if (gnode == node)
-		return;
-
 	if (purple_find_group(group->name)) {
 		/* This is just being moved */