Mercurial > pidgin.yaz
comparison 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 |
comparison
equal
deleted
inserted
replaced
10105:e94f5975a4df | 10106:131f70fc53c1 |
---|---|
1581 | 1581 |
1582 /* Remove this account's buddies */ | 1582 /* Remove this account's buddies */ |
1583 for (gnode = gaim_get_blist()->root; gnode != NULL; gnode = gnode->next) { | 1583 for (gnode = gaim_get_blist()->root; gnode != NULL; gnode = gnode->next) { |
1584 if (!GAIM_BLIST_NODE_IS_GROUP(gnode)) | 1584 if (!GAIM_BLIST_NODE_IS_GROUP(gnode)) |
1585 continue; | 1585 continue; |
1586 for (cnode = gnode->child; cnode; cnode = cnode->next) { | 1586 |
1587 cnode = gnode->child; | |
1588 while (cnode) { | |
1589 GaimBlistNode *cnode_next = cnode->next; | |
1590 | |
1587 if(GAIM_BLIST_NODE_IS_CONTACT(cnode)) { | 1591 if(GAIM_BLIST_NODE_IS_CONTACT(cnode)) { |
1588 for (bnode = cnode->child; bnode; bnode = bnode->next) { | 1592 bnode = cnode->child; |
1593 while (bnode) { | |
1594 GaimBlistNode *bnode_next = bnode->next; | |
1595 | |
1589 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { | 1596 if (GAIM_BLIST_NODE_IS_BUDDY(bnode)) { |
1590 GaimBuddy *b = (GaimBuddy *)bnode; | 1597 GaimBuddy *b = (GaimBuddy *)bnode; |
1591 | 1598 |
1592 if (b->account == account) | 1599 if (b->account == account) |
1593 gaim_blist_remove_buddy(b); | 1600 gaim_blist_remove_buddy(b); |
1594 } | 1601 } |
1602 bnode = bnode_next; | |
1595 } | 1603 } |
1596 } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { | 1604 } else if (GAIM_BLIST_NODE_IS_CHAT(cnode)) { |
1597 GaimChat *c = (GaimChat *)cnode; | 1605 GaimChat *c = (GaimChat *)cnode; |
1598 | 1606 |
1599 if (c->account == account) | 1607 if (c->account == account) |
1600 gaim_blist_remove_chat(c); | 1608 gaim_blist_remove_chat(c); |
1601 } | 1609 } |
1610 cnode = cnode_next; | |
1602 } | 1611 } |
1603 } | 1612 } |
1604 | 1613 |
1605 /* Remove this account's pounces */ | 1614 /* Remove this account's pounces */ |
1606 gaim_pounce_destroy_all_by_account(account); | 1615 gaim_pounce_destroy_all_by_account(account); |