Mercurial > pidgin.yaz
changeset 10106:131f70fc53c1
[gaim-migrate @ 11138]
Fixed a crash deleting accounts (Andrew Hart)
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sun, 17 Oct 2004 22:37:46 +0000 |
parents | e94f5975a4df |
children | 65e7df286076 |
files | COPYRIGHT src/account.c |
diffstat | 2 files changed, 12 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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; } }