# HG changeset patch # User Mark Doliner # Date 1099979306 0 # Node ID 72c9e9bb2c197c0f569a4cdd5473dad93377a9b4 # Parent 5c3b2776312642ddb657899e469bba231ce22893 [gaim-migrate @ 11252] A nice contact-deletion crash fix from Andrew Hart. Thanks Andrew! committer: Tailor Script diff -r 5c3b27763126 -r 72c9e9bb2c19 src/blist.c --- a/src/blist.c Tue Nov 09 05:41:41 2004 +0000 +++ b/src/blist.c Tue Nov 09 05:48:26 2004 +0000 @@ -1179,11 +1179,18 @@ if (node->child) { /* * If this contact has children then remove them. When the last - * buddy is removed from the contact, the contact is deleted. + * buddy is removed from the contact, the contact is automatically + * deleted. */ - while (node->child) { + while (node->child->next) { gaim_blist_remove_buddy((GaimBuddy*)node->child); } + /* + * Remove the last buddy and trigger the deletion of the contact. + * It would probably be cleaner if contact-deletion was done after + * a timeout? Or if it had to be done manually, like below? + */ + gaim_blist_remove_buddy((GaimBuddy*)node->child); } else { /* Remove the node from its parent */ if (gnode->child == node)