[gaim-migrate @ 11138]

Sun, 17 Oct 2004 22:37:46 +0000

author
Luke Schierer <lschiere@pidgin.im>
date
Sun, 17 Oct 2004 22:37:46 +0000
changeset 10106
2ba5aef13261
parent 10105
774d58172341
child 10107
a722b8760bed

[gaim-migrate @ 11138]
Fixed a crash deleting accounts (Andrew Hart)

COPYRIGHT file | annotate | diff | comparison | revisions
src/account.c file | annotate | diff | comparison | revisions
--- 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;
 		}
 	}
 

mercurial