diff options
author | karl-qdh <karl@qdh.org.uk> | 2011-02-16 16:42:06 +0000 |
---|---|---|
committer | karl-qdh <karl@qdh.org.uk> | 2011-02-16 16:42:06 +0000 |
commit | f6fa7241fd63bbbd451b57233f2f35a9525d5b36 (patch) | |
tree | c99a6865919d50f1c9b1cf66595e16607224deda | |
parent | 4feb65c931038f4d6030bffaf44dadf7b10b1e20 (diff) | |
download | ayatana-indicator-datetime-f6fa7241fd63bbbd451b57233f2f35a9525d5b36.tar.gz ayatana-indicator-datetime-f6fa7241fd63bbbd451b57233f2f35a9525d5b36.tar.bz2 ayatana-indicator-datetime-f6fa7241fd63bbbd451b57233f2f35a9525d5b36.zip |
Probable cause of segfault identified, trying to get dates from types without dates most likely cause
-rw-r--r-- | src/datetime-service.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/datetime-service.c b/src/datetime-service.c index ecebcce..9a74af2 100644 --- a/src/datetime-service.c +++ b/src/datetime-service.c @@ -464,6 +464,9 @@ compare_appointment_items (ECalComponent *a, if (a == NULL || b == NULL) return retval; 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) e_cal_component_get_dtstart (a, &datetime_a); else @@ -472,6 +475,8 @@ 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) e_cal_component_get_dtstart (b, &datetime_b); else |