From 686e2dabe9ecfb69423dc50f84d012eb06b98dde Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Fri, 26 Nov 2004 13:12:08 +0000 Subject: prevent crash if there is no description 2004-11-26 JP Rosevear * gui/alarm-notify/alarm-queue.c (display_notification): prevent crash if there is no description svn path=/trunk/; revision=27994 --- calendar/ChangeLog | 5 +++++ calendar/gui/alarm-notify/alarm-queue.c | 14 +++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 566e77b4a9..dbad295e2d 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,8 @@ +2004-11-26 JP Rosevear + + * gui/alarm-notify/alarm-queue.c (display_notification): prevent + crash if there is no description + 2004-11-25 Harish Krishnaswamy * gui/calendar-component.c: diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index 028cd8d00a..5d7b6b2078 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -949,11 +949,15 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa, e_cal_component_get_description_list (comp, &text_list); - text = *((ECalComponentText *)text_list->data); - if (text.value) - description = text.value; - else - description = _("No description available."); + if (text_list) { + text = *((ECalComponentText *)text_list->data); + if (text.value) + description = text.value; + else + description = _("No description available."); + } else { + description = _("No description available."); + } e_cal_component_free_text_list (text_list); -- cgit v1.2.3