Fix pidgin_blist_node_is_contact_expanded() to not crash on buddy list

Mon, 11 Jun 2007 01:00:27 +0000

author
Stu Tomlinson <nosnilmot@pidgin.im>
date
Mon, 11 Jun 2007 01:00:27 +0000
changeset 17710
9a0fbabde044
parent 17709
619a488ed1c1
child 17711
cc9c95e0a91c

Fix pidgin_blist_node_is_contact_expanded() to not crash on buddy list
nodes that are not part of a contact

pidgin/gtkblist.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkblist.c	Mon Jun 11 00:23:35 2007 +0000
+++ b/pidgin/gtkblist.c	Mon Jun 11 01:00:27 2007 +0000
@@ -3733,8 +3733,11 @@
 
 gboolean pidgin_blist_node_is_contact_expanded(PurpleBlistNode *node)
 {
-	if PURPLE_BLIST_NODE_IS_BUDDY(node)
+	if (PURPLE_BLIST_NODE_IS_BUDDY(node)) {
 		node = node->parent;
+		if (node == NULL)
+			return FALSE;
+	}
 
 	g_return_val_if_fail(PURPLE_BLIST_NODE_IS_CONTACT(node), FALSE);
 

mercurial