aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog5
-rw-r--r--calendar/pcs/cal-backend-file.c8
2 files changed, 11 insertions, 2 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog
index 749deb02c0..8e5925eb5e 100644
--- a/calendar/ChangeLog
+++ b/calendar/ChangeLog
@@ -1,5 +1,10 @@
2000-12-22 JP Rosevear <jpr@helixcode.com>
+ * pcs/cal-backend-file.c (cal_backend_file_get_alarms_for_object):
+ account for the case where there are no alarms, fixes crash
+
+2000-12-22 JP Rosevear <jpr@helixcode.com>
+
* gui/goto.c (ecal_date_range_changed): New function to keep the
ecal marked properly
(create_ecal): move more creation code here, update marks
diff --git a/calendar/pcs/cal-backend-file.c b/calendar/pcs/cal-backend-file.c
index 4de8c8a4a2..168067f41e 100644
--- a/calendar/pcs/cal-backend-file.c
+++ b/calendar/pcs/cal-backend-file.c
@@ -1290,8 +1290,12 @@ cal_backend_file_get_alarms_for_object (CalBackend *backend, const char *uid,
g_free (comp_str);
alarms = generate_alarms_for_comp (comp, start, end);
- fill_alarm_instances_seq (&corba_alarms->alarms, alarms->alarms);
- cal_component_alarms_free (alarms);
+ if (alarms) {
+ fill_alarm_instances_seq (&corba_alarms->alarms, alarms->alarms);
+ cal_component_alarms_free (alarms);
+ } else {
+ fill_alarm_instances_seq (&corba_alarms->alarms, NULL);
+ }
return corba_alarms;
}