changeset 17830:0e445e906cfd

Fix pidgin_blist_node_is_contact_expanded() to not crash on buddy list nodes that are not part of a contact
author Stu Tomlinson <stu@nosnilmot.com>
date Mon, 11 Jun 2007 01:00:27 +0000
parents b1754db7010b
children 4c05f284253b
files pidgin/gtkblist.c
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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);