--- 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))