aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/cal-backend-file.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs/cal-backend-file.c')
-rw-r--r--calendar/pcs/cal-backend-file.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 078415fa02..06b75d52a6 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -473,7 +473,6 @@ add_component (CalBackendFile *cbfile, CalComponent *comp, gboolean add_to_tople
CalBackendFilePrivate *priv;
GList **list;
const char *uid;
- gchar *key;
unsigned long *pilot_id;
priv = cbfile->priv;
@@ -501,14 +500,13 @@ add_component (CalBackendFile *cbfile, CalComponent *comp, gboolean add_to_tople
*/
check_dup_uid (cbfile, comp);
cal_component_get_uid (comp, &uid);
- key = g_strdup (uid);
- g_hash_table_insert (priv->comp_uid_hash, key, comp);
+ g_hash_table_insert (priv->comp_uid_hash, (char *)uid, comp);
/* Update the pilot list, if there is a pilot id */
cal_component_get_pilot_id (comp, &pilot_id);
if (pilot_id)
g_hash_table_insert (priv->comp_pilot_hash,
- pilot_id, (char *)key);
+ pilot_id, (char *)uid);
*list = g_list_prepend (*list, comp);
@@ -549,9 +547,10 @@ remove_component (CalBackendFile *cbfile, CalComponent *comp)
/* Remove it from our mapping */
cal_component_get_uid (comp, &uid);
- cal_component_get_pilot_id (comp, &pilot_id);
g_hash_table_remove (priv->comp_uid_hash, uid);
- g_hash_table_remove (priv->comp_pilot_hash, pilot_id);
+ cal_component_get_pilot_id (comp, &pilot_id);
+ if (pilot_id)
+ g_hash_table_remove (priv->comp_pilot_hash, pilot_id);
switch (cal_component_get_vtype (comp)) {
case CAL_COMPONENT_EVENT:
-301-0/+10 * - Fix build with libc++ 3.8.0zi2016-05-091-0/+60 * Remove ${PORTSDIR}/ from dependencies, categories m, n, o, and p.mat2016-04-011-1/+1 * net/mosh: document ncurses requirement (USES+=ncurses)marino2016-02-051-1/+1 * - Drop 8.x supportamdmi32015-09-041-9/+1 * Remove UNIQUENAME and LATEST_LINK.mat2015-08-171-2/+0 * - Update to 1.2.5zi2015-07-232-5/+4 * - Don't cat pkg-message from Makefilesamdmi32015-05-211-3/+0 * - Update to 2.6.0sunpoet2014-10-041-0/+1 * - Fix build when devel/ncurses is installedzi2014-01-151-2/+3 * - Convert to stagingmat2013-11-061-5/+4 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * - convert to the new perl5 frameworkaz2013-09-161-2/+2 * Finish converting the whole ports tree to USES=pkgconfigbapt2013-04-231-1/+1 * - Update to 1.2.4zi2013-03-273-24/+4 * 1: Upgrade protobuf to 2.5.0.vanilla2013-03-181-1/+1 * - Fix calls to setsockopt.zi2012-10-242-0/+19 * - Update to 1.2.3zi2012-10-202-8/+7 * Fix typos in COMMENTcs2012-07-291-1/+1 * - Update to 1.2.2zi2012-06-142-5/+5 * - Remove SITE_PERL from *_DEPENDSzi2012-06-051-1/+1 * - Update to 1.2.1zi2012-05-262-3/+3 * - Update to 1.2zi2012-04-267-94/+8 * - Note CONFLICT between net/mosh and lang/mosh, as they both install bin/moshzi2012-04-121-1/+3 * - Fix _DEPENDSzi2012-04-123-3/+33