aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorJP Rosevear <jpr@helixcode.com>2000-12-23 11:43:33 +0800
committerJP Rosevear <jpr@src.gnome.org>2000-12-23 11:43:33 +0800
commit4f689a3f228d7c5575e95825c88f4afa99646c62 (patch)
tree5bb4520dd0f0abfc2e1fed079cad55ebd2e5bfc5 /calendar
parentbf39da80e51a03ff8f6eb712d18a97d98d67e116 (diff)
downloadgsoc2013-evolution-4f689a3f228d7c5575e95825c88f4afa99646c62.tar.gz
gsoc2013-evolution-4f689a3f228d7c5575e95825c88f4afa99646c62.tar.zst
gsoc2013-evolution-4f689a3f228d7c5575e95825c88f4afa99646c62.zip
account for the case where there are no alarms, fixes crash
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 svn path=/trunk/; revision=7134
Diffstat (limited to 'calendar')
-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;
}