[gnome-color-manager/gnome-2-30] Do not crash when the schema is invalid and GConf reports an error
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager/gnome-2-30] Do not crash when the schema is invalid and GConf reports an error
- Date: Wed, 5 May 2010 20:08:15 +0000 (UTC)
commit 885f23254689f75c25e27fe62dc578eb397a16f7
Author: Richard Hughes <richard hughsie com>
Date: Wed May 5 21:05:36 2010 +0100
Do not crash when the schema is invalid and GConf reports an error
src/gcm-prefs.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/gcm-prefs.c b/src/gcm-prefs.c
index 83e164e..ddef07d 100644
--- a/src/gcm-prefs.c
+++ b/src/gcm-prefs.c
@@ -2378,7 +2378,7 @@ gcm_prefs_startup_phase1_idle_cb (gpointer user_data)
/* setup RGB combobox */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_space_rgb"));
colorspace_rgb = gconf_client_get_string (gconf_client, GCM_SETTINGS_COLORSPACE_RGB, &error);
- if (colorspace_rgb == NULL) {
+ if (colorspace_rgb == NULL && error != NULL) {
egg_warning ("failed to get configuration value: %s", error->message);
g_clear_error (&error);
}
@@ -2390,7 +2390,7 @@ gcm_prefs_startup_phase1_idle_cb (gpointer user_data)
/* setup CMYK combobox */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_space_cmyk"));
colorspace_cmyk = gconf_client_get_string (gconf_client, GCM_SETTINGS_COLORSPACE_CMYK, NULL);
- if (colorspace_cmyk == NULL) {
+ if (colorspace_cmyk == NULL && error != NULL) {
egg_warning ("failed to get configuration value: %s", error->message);
g_clear_error (&error);
}
@@ -2402,8 +2402,8 @@ gcm_prefs_startup_phase1_idle_cb (gpointer user_data)
/* setup rendering lists */
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_rendering_display"));
gcm_prefs_set_combo_simple_text (widget);
- intent_display = gconf_client_get_string (gconf_client, GCM_SETTINGS_RENDERING_INTENT_DISPLAY, NULL);
- if (intent_display == NULL) {
+ intent_display = gconf_client_get_string (gconf_client, GCM_SETTINGS_RENDERING_INTENT_DISPLAY, &error);
+ if (intent_display == NULL && error != NULL) {
egg_warning ("failed to get configuration value: %s", error->message);
g_clear_error (&error);
}
@@ -2413,8 +2413,8 @@ gcm_prefs_startup_phase1_idle_cb (gpointer user_data)
widget = GTK_WIDGET (gtk_builder_get_object (builder, "combobox_rendering_softproof"));
gcm_prefs_set_combo_simple_text (widget);
- intent_softproof = gconf_client_get_string (gconf_client, GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF, NULL);
- if (intent_softproof == NULL) {
+ intent_softproof = gconf_client_get_string (gconf_client, GCM_SETTINGS_RENDERING_INTENT_SOFTPROOF, &error);
+ if (intent_softproof == NULL && error != NULL) {
egg_warning ("failed to get configuration value: %s", error->message);
g_clear_error (&error);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]