# HG changeset patch # User Luke Schierer # Date 1098052666 0 # Node ID 131f70fc53c1090093b879429203b998867267de # Parent e94f5975a4dff724ba32b7bc22c08da1cf53284b [gaim-migrate @ 11138] Fixed a crash deleting accounts (Andrew Hart) committer: Tailor Script diff -r e94f5975a4df -r 131f70fc53c1 COPYRIGHT --- a/COPYRIGHT Sun Oct 17 00:33:22 2004 +0000 +++ b/COPYRIGHT Sun Oct 17 22:37:46 2004 +0000 @@ -69,6 +69,7 @@ Ryan C. Gordon Christian Hammond Andy Harrison +Andrew (arhart) Hart G. Sumner Hayes Mike Heffner Benjamin Herrenschmidt diff -r e94f5975a4df -r 131f70fc53c1 src/account.c --- a/src/account.c Sun Oct 17 00:33:22 2004 +0000 +++ b/src/account.c Sun Oct 17 22:37:46 2004 +0000 @@ -1583,15 +1583,23 @@ for (gnode = gaim_get_blist()->root; gnode != NULL; gnode = gnode->next) { if (!GAIM_BLIST_NODE_IS_GROUP(gnode)) continue; - for (cnode = gnode->child; cnode; cnode = cnode->next) { + + cnode = gnode->child; + while (cnode) { + GaimBlistNode *cnode_next = cnode->next; + if(GAIM_BLIST_NODE_IS_CONTACT(cnode)) { - for (bnode = cnode->child; bnode; bnode = bnode->next) { + bnode = cnode->child; + while (bnode) { + GaimBlistNode *bnode_next = bnode->next; + if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { GaimBuddy *b = (GaimBuddy *)bnode; if (b->account == account) gaim_blist_remove_buddy(b); } + bnode = bnode_next; } } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { GaimChat *c = (GaimChat *)cnode; @@ -1599,6 +1607,7 @@ if (c->account == account) gaim_blist_remove_chat(c); } + cnode = cnode_next; } }