changeset 6295:44daf60ae44a

[gaim-migrate @ 6794] don't let NULL string prefs wreak havoc committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Thu, 24 Jul 2003 05:32:53 +0000
parents 430693544643
children 3ac224953483
files src/prefs.c
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/prefs.c	Thu Jul 24 05:27:29 2003 +0000
+++ b/src/prefs.c	Thu Jul 24 05:32:53 2003 +0000
@@ -441,7 +441,9 @@
 			return;
 		}
 
-		if(strcmp(pref->value.string, value)) {
+		if((value && !pref->value.string) ||
+				(!value && pref->value.string) ||
+				strcmp(pref->value.string, value)) {
 			g_free(pref->value.string);
 			pref->value.string = g_strdup(value);
 			do_callbacks(name, pref);