# HG changeset patch # User Nathan Walp # Date 1063047260 0 # Node ID ab5dd35443c6fd27f4d98ad568f4b155401abf19 # Parent 3d84c933b939ad84109af010568ea29e54908922 [gaim-migrate @ 7333] let's not access memory after it's free'd, ok? committer: Tailor Script diff -r 3d84c933b939 -r ab5dd35443c6 src/blist.c --- 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)) {