From 0ceb317ac649643983e920b71713be9c14765072 Mon Sep 17 00:00:00 2001 From: Rob Adams Date: Fri, 30 Apr 2004 00:26:48 +0000 Subject: [PATCH] Add a value type check for the visual bell/audible bell gconf settings. 2004-04-29 Rob Adams * src/prefs.c (change_notify): Add a value type check for the visual bell/audible bell gconf settings. Patch from Jarrod Johnson for #141409. --- ChangeLog | 6 ++++++ src/prefs.c | 14 ++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/ChangeLog b/ChangeLog index 51a339564..b70fe8862 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-04-29 Rob Adams + + * src/prefs.c (change_notify): Add a value type check for the + visual bell/audible bell gconf settings. Patch from Jarrod + Johnson for #141409. + 2004-04-19 Mark McLoughlin Syncing across this change from libwnck. diff --git a/src/prefs.c b/src/prefs.c index 81af51e3e..1166f51b8 100644 --- a/src/prefs.c +++ b/src/prefs.c @@ -715,6 +715,13 @@ change_notify (GConfClient *client, { gboolean b; + if (value && value->type != GCONF_VALUE_BOOL) + { + meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), + key); + goto out; + } + b = value ? gconf_value_get_bool (value) : provide_visual_bell; if (update_visual_bell (b, bell_is_audible)) queue_changed (META_PREF_VISUAL_BELL); @@ -723,6 +730,13 @@ change_notify (GConfClient *client, { gboolean b; + if (value && value->type != GCONF_VALUE_BOOL) + { + meta_warning (_("GConf key \"%s\" is set to an invalid type\n"), + key); + goto out; + } + b = value ? gconf_value_get_bool (value) : bell_is_audible; if (update_visual_bell (provide_visual_bell, b)) queue_changed (META_PREF_AUDIBLE_BELL);