src/blist.c

changeset 6794
2c9fedb2c8a6
parent 6778
4f13d762b4ea
child 6803
4bd2e181b3ab
--- a/src/blist.c	Mon Sep 08 10:08:39 2003 +0000
+++ b/src/blist.c	Mon Sep 08 18:54:20 2003 +0000
@@ -593,11 +593,8 @@
 			bnode->next->prev = bnode->prev;
 		if(bnode->prev)
 			bnode->prev->next = bnode->next;
-		if(bnode->parent->child == bnode) {
+		if(bnode->parent->child == bnode)
 			bnode->parent->child = bnode->next;
-			if(!bnode->parent->child)
-				gaim_blist_remove_contact((GaimContact*)bnode->parent);
-		}
 
 		ops->remove(gaimbuddylist, bnode);
 
@@ -611,6 +608,10 @@
 			g_hash_table_remove(gaimbuddylist->buddies, hb);
 			g_free(hb);
 		}
+
+		if(!bnode->parent->child)
+			gaim_blist_remove_contact((GaimContact*)bnode->parent);
+
 	}
 
 	if(node && GAIM_BLIST_NODE_IS_BUDDY(node)) {

mercurial