Mercurial > pidgin.yaz
diff src/account.c @ 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 | 39142bdd5ba6 |
children | 760e690a5f30 |
line wrap: on
line diff
--- 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; } }