changeset 16555:1b58a7fabb7e

this patch from sadrul fixes the first crash I hit
author Luke Schierer <lschiere@pidgin.im>
date Sat, 28 Apr 2007 00:15:10 +0000
parents 478bc85c4aec
children 0cd684e34403
files libpurple/prefs.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/prefs.c	Sat Apr 28 00:11:10 2007 +0000
+++ b/libpurple/prefs.c	Sat Apr 28 00:15:10 2007 +0000
@@ -1102,13 +1102,14 @@
 static void
 purple_prefs_rename_node(struct purple_pref *oldpref, struct purple_pref *newpref)
 {
-	struct purple_pref *child;
+	struct purple_pref *child, *next;
 	char *oldname, *newname;
 
 	/* if we're a parent, rename the kids first */
-	for(child = oldpref->first_child; child != NULL; child = child->sibling)
+	for(child = oldpref->first_child; child != NULL; child = next)
 	{
 		struct purple_pref *newchild;
+		next = child->sibling;
 		for(newchild = newpref->first_child; newchild != NULL; newchild = newchild->sibling)
 		{
 			if(!strcmp(child->name, newchild->name))