--- calendar/backends/file/e-cal-backend-file.c.orig 2006-02-28 13:16:32.000000000 +0100 +++ calendar/backends/file/e-cal-backend-file.c 2006-03-23 15:15:18.582703795 +0100 @@ -399,13 +399,17 @@ check_dup_uid (ECalBackendFile *cbfile, { ECalBackendFilePrivate *priv; ECalBackendFileObject *obj_data; - const char *uid; + const char *uid = NULL; char *new_uid; priv = cbfile->priv; e_cal_component_get_uid (comp, &uid); - + if (!uid) { + g_warning ("Checking for duplicate uid, the component does not have a valid UID skipping it\n"); + return; + } + obj_data = g_hash_table_lookup (priv->comp_uid_hash, uid); if (!obj_data) return; /* Everything is fine */ @@ -447,11 +451,16 @@ add_component (ECalBackendFile *cbfile, { ECalBackendFilePrivate *priv; ECalBackendFileObject *obj_data; - const char *uid; + const char *uid = NULL; priv = cbfile->priv; e_cal_component_get_uid (comp, &uid); + if (!uid) { + g_warning ("The component does not have a valid UID skipping it\n"); + return; + } + obj_data = g_hash_table_lookup (priv->comp_uid_hash, uid); if (e_cal_component_is_instance (comp)) { const char *rid;