aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Crozat <fcrozat@src.gnome.org>2004-04-21 15:21:01 +0800
committerFrédéric Crozat <fcrozat@src.gnome.org>2004-04-21 15:21:01 +0800
commit400a4a04c6aa77b9b1e41f07a3c277e51f339799 (patch)
tree47b8b5e8d5ee79bdb36697eb2c341797c77e9e0c
parent61b2324b4e263709a359938bdfc8e640fbb1f6ba (diff)
downloadgsoc2013-evolution-400a4a04c6aa77b9b1e41f07a3c277e51f339799.tar.gz
gsoc2013-evolution-400a4a04c6aa77b9b1e41f07a3c277e51f339799.tar.zst
gsoc2013-evolution-400a4a04c6aa77b9b1e41f07a3c277e51f339799.zip
Fix crash when gconf value are not existing in the gconf database.
* gui/migration.c: (migrate_calendars): Fix crash when gconf value are not existing in the gconf database. svn path=/trunk/; revision=25555
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/migration.c8
2 files changed, 11 insertions, 3 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 51c8a52c3b..90c5b1511b 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,3 +1,9 @@
+2004-04-21 Frederic Crozat <fcrozat@mandrakesoft.com>
+
+ * gui/migration.c: (migrate_calendars):
+ Fix crash when gconf value are not existing in the gconf
+ database.
+
2004-04-21 Not Zed <NotZed@Ximian.com>
* gui/gnome-cal.c (gnome_calendar_set_ui_component): fix for
diff --git a/calendar/gui/migration.c b/calendar/gui/migration.c
index c2f94cf574..18300210cf 100644
--- a/calendar/gui/migration.c
+++ b/calendar/gui/migration.c
@@ -633,9 +633,11 @@ migrate_calendars (CalendarComponent *component, int major, int minor, int revis
for (i = 0; keys[i]; i++) {
gconf_val = gconf_client_get (gconf, keys[i], NULL);
- if (gconf_val->type != GCONF_VALUE_INT)
- gconf_client_unset (gconf, keys[i], NULL);
- gconf_value_free (gconf_val);
+ if (gconf_val) {
+ if (gconf_val->type != GCONF_VALUE_INT)
+ gconf_client_unset (gconf, keys[i], NULL);
+ gconf_value_free (gconf_val);
+ }
}
g_object_unref (gconf);