From 90250eed1546dfa236b9951f74094ac443df47e0 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 29 Apr 2004 02:29:57 +0000 Subject: check we find any usable components of the icalendar entry before 2004-04-29 Not Zed * gui/e-itip-control.c (e_itip_control_set_data): check we find any usable components of the icalendar entry before dereferncing it. Fixes crash in #57264. svn path=/trunk/; revision=25675 --- calendar/ChangeLog | 6 ++++++ calendar/gui/e-itip-control.c | 12 +++++++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 8aabd0176e..1741368db6 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2004-04-29 Not Zed + + * gui/e-itip-control.c (e_itip_control_set_data): check we find + any usable components of the icalendar entry before dereferncing + it. Fixes crash in #57264. + 2004-04-28 Not Zed * gui/e-itip-control.c (object_requested_cb): dont shadow source diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index 3ba4097cae..0cc1b06cd9 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -1523,11 +1523,13 @@ e_itip_control_set_data (EItipControl *itip, const gchar *text) priv->iter = icalcomponent_begin_component (priv->main_comp, ICAL_ANY_COMPONENT); priv->ical_comp = icalcompiter_deref (&priv->iter); - kind = icalcomponent_isa (priv->ical_comp); - if (kind != ICAL_VEVENT_COMPONENT - && kind != ICAL_VTODO_COMPONENT - && kind != ICAL_VFREEBUSY_COMPONENT) - priv->ical_comp = get_next (&priv->iter); + if (priv->ical_comp != NULL) { + kind = icalcomponent_isa (priv->ical_comp); + if (kind != ICAL_VEVENT_COMPONENT + && kind != ICAL_VTODO_COMPONENT + && kind != ICAL_VFREEBUSY_COMPONENT) + priv->ical_comp = get_next (&priv->iter); + } if (priv->ical_comp == NULL) { write_error_html (itip, _("The attachment has no viewable calendar items")); -- cgit