[evolution-patches] Patch: fix crash in calendar migration
- From: Frederic Crozat <fcrozat mandrakesoft com>
- To: evolution-patches ximian com
- Subject: [evolution-patches] Patch: fix crash in calendar migration
- Date: Tue, 20 Apr 2004 19:44:53 +0200
While packaging evolution 1.5.7 for Mdk cooker, I found a crash on my
system during calendar migration, where some calendar gconf keys were
not set.
The attached patch fixes the crash.
Permission to commit ?
--
Frederic Crozat <fcrozat mandrakesoft com>
Mandrakesoft
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/calendar/ChangeLog,v
retrieving revision 1.2262
diff -u -p -r1.2262 ChangeLog
--- ChangeLog 19 Apr 2004 15:19:32 -0000 1.2262
+++ ChangeLog 20 Apr 2004 17:42:22 -0000
@@ -1,3 +1,9 @@
+2004-04-20 Frederic Crozat <fcrozat mandrakesoft com>
+
+ * gui/migration.c: (migrate_calendars):
+ Fix crash when gconf value are not existing in the gconf
+ database.
+
2004-04-19 Michael Terry <mike mterry name>
* gui/GNOME_Evolution_Calendar.server.in.in:
Index: gui/migration.c
===================================================================
RCS file: /cvs/gnome/evolution/calendar/gui/migration.c,v
retrieving revision 1.22
diff -u -p -r1.22 migration.c
--- gui/migration.c 15 Apr 2004 11:16:23 -0000 1.22
+++ gui/migration.c 20 Apr 2004 17:42:22 -0000
@@ -633,9 +633,11 @@ migrate_calendars (CalendarComponent *co
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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]