changeset 13638:a376b680ae84

[gaim-migrate @ 16036] Fix Coverity CID 100, setting a string pref to NULL that was already NULL would crash committer: Tailor Script <tailor@pidgin.im>
author Stu Tomlinson <stu@nosnilmot.com>
date Sat, 15 Apr 2006 14:53:51 +0000
parents 83ec59aefbe5
children 43c7e892d8bf
files src/prefs.c
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/prefs.c	Sat Apr 15 14:40:55 2006 +0000
+++ b/src/prefs.c	Sat Apr 15 14:53:51 2006 +0000
@@ -769,7 +769,8 @@
 
 		if((value && !pref->value.string) ||
 				(!value && pref->value.string) ||
-				strcmp(pref->value.string, value)) {
+				(value && pref->value.string &&
+				 strcmp(pref->value.string, value))) {
 			g_free(pref->value.string);
 			pref->value.string = g_strdup(value);
 			do_callbacks(name, pref);