Fail verbosely instead of silent crashing on certain missing/broken schemas

This commit is contained in:
Lauris Kaplinski 2002-03-25 22:27:54 +00:00
parent fc7c0a3f27
commit 8835f45c62
2 changed files with 12 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2002-03-25 Lauris Kaplinski <lauris@ximian.com>
* gconf-property-editor.c (gconf_peditor_widget_set_guard): Test for NULL
gconf value
2002-03-19 Richard Hestilow <hestilow@ximian.com>
* Makefile.am: Include libbackground (used for preview-file-selector).

View file

@ -1070,8 +1070,13 @@ gconf_peditor_widget_set_guard (GConfPropertyEditor *peditor,
client = gconf_client_get_default ();
value = gconf_client_get (client, peditor->p->key, NULL);
if (value) {
gtk_widget_set_sensitive (widget, guard_get_bool (peditor, value));
gconf_value_free (value);
} else {
g_warning ("NULL GConf value: %s: possibly incomplete setup", peditor->p->key);
}
g_signal_connect (G_OBJECT (peditor), "value-changed", (GCallback) guard_value_changed, widget);
}