From 400a4a04c6aa77b9b1e41f07a3c277e51f339799 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Crozat?= Date: Wed, 21 Apr 2004 07:21:01 +0000 Subject: 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 --- calendar/gui/migration.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'calendar/gui') 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); -- cgit v1.2.3