aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--calendar/ChangeLog6
-rw-r--r--calendar/gui/e-itip-control.c12
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 <NotZed@Ximian.com>
+
+ * 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 <NotZed@Ximian.com>
* 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"));