changeset 12599:e94c33909aa6

[gaim-migrate @ 14929] i don't know how this is happening, but apparently it is, so now we'll protect against it committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Wed, 21 Dec 2005 13:37:18 +0000
parents 1c122dbc8e9e
children e856f985a0b9
files src/prefs.c
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/prefs.c	Wed Dec 21 12:22:04 2005 +0000
+++ b/src/prefs.c	Wed Dec 21 13:37:18 2005 +0000
@@ -620,9 +620,10 @@
 		pref->parent->first_child = pref->sibling;
 	} else {
 		struct gaim_pref *sib = pref->parent->first_child;
-		while(sib->sibling != pref)
+		while(sib && sib->sibling != pref)
 			sib = sib->sibling;
-		sib->sibling = pref->sibling;
+		if(sib)
+			sib->sibling = pref->sibling;
 	}
 
 	name = pref_full_name(pref);