changeset 28448:572073acf8e7

I think this was the optimization they wanted when this first broke.
author Elliott Sales de Andrade <qulogic@pidgin.im>
date Wed, 26 Aug 2009 01:09:33 +0000
parents b357216b7b79
children 7a211be81a6b 1b534812157d
files pidgin/gtkblist.c
diffstat 1 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pidgin/gtkblist.c	Tue Aug 25 16:38:18 2009 +0000
+++ b/pidgin/gtkblist.c	Wed Aug 26 01:09:33 2009 +0000
@@ -496,12 +496,17 @@
 	for (tmp = merges; tmp; tmp = tmp->next) {
 		PurpleBlistNode *node = tmp->data;
 		PurpleBlistNode *b;
+		PurpleBlistNodeType type;
 		int i = 0;
 
-		if (purple_blist_node_get_type(node) == PURPLE_BLIST_BUDDY_NODE)
+		type = purple_blist_node_get_type(node);
+
+		if (type == PURPLE_BLIST_BUDDY_NODE) {
 			node = purple_blist_node_get_parent(node);
-
-		if (purple_blist_node_get_type(node) != PURPLE_BLIST_CONTACT_NODE)
+			type = purple_blist_node_get_type(node);
+		}
+
+		if (type != PURPLE_BLIST_CONTACT_NODE)
 			continue;
 
 		for (b = purple_blist_node_get_first_child(node);