aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/datetime-service.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c
index 6303a98..a6e756e 100644
--- a/src/datetime-service.c
+++ b/src/datetime-service.c
@@ -422,8 +422,10 @@ compare_appointment_items (ECalComponent *a,
ECalComponentVType vtype = e_cal_component_get_vtype (a);
- if (vtype != E_CAL_COMPONENT_EVENT && vtype != E_CAL_COMPONENT_TODO) return -1;
-
+ if (vtype != E_CAL_COMPONENT_EVENT && vtype != E_CAL_COMPONENT_TODO) {
+ g_debug("E-Cal Component is neither an event or a todo");
+ return -1;
+ }
if (vtype == E_CAL_COMPONENT_EVENT)
e_cal_component_get_dtstart (a, &datetime_a);
else
@@ -432,8 +434,11 @@ compare_appointment_items (ECalComponent *a,
t_a = mktime(&tm_a);
vtype = e_cal_component_get_vtype (b);
- if (vtype != E_CAL_COMPONENT_EVENT && vtype != E_CAL_COMPONENT_TODO) return 1;
-
+ if (vtype != E_CAL_COMPONENT_EVENT && vtype != E_CAL_COMPONENT_TODO) {
+ e_cal_component_free_datetime (&datetime_a);
+ g_debug("E-Cal Component is neither an event or a todo");
+ return -1;
+ }
if (vtype == E_CAL_COMPONENT_EVENT)
e_cal_component_get_dtstart (b, &datetime_b);
else