diff options
author | Not Zed <NotZed@Ximian.com> | 2004-04-29 10:29:57 +0800 |
---|---|---|
committer | Michael Zucci <zucchi@src.gnome.org> | 2004-04-29 10:29:57 +0800 |
commit | 90250eed1546dfa236b9951f74094ac443df47e0 (patch) | |
tree | c0de4098926165982d182b9366b69a534d2f7405 /calendar/gui | |
parent | 0c606756b7257560bb65cc9f6add9c0b6eac9150 (diff) | |
download | gsoc2013-evolution-90250eed1546dfa236b9951f74094ac443df47e0.tar gsoc2013-evolution-90250eed1546dfa236b9951f74094ac443df47e0.tar.gz gsoc2013-evolution-90250eed1546dfa236b9951f74094ac443df47e0.tar.bz2 gsoc2013-evolution-90250eed1546dfa236b9951f74094ac443df47e0.tar.lz gsoc2013-evolution-90250eed1546dfa236b9951f74094ac443df47e0.tar.xz gsoc2013-evolution-90250eed1546dfa236b9951f74094ac443df47e0.tar.zst gsoc2013-evolution-90250eed1546dfa236b9951f74094ac443df47e0.zip |
check we find any usable components of the icalendar entry before
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.
svn path=/trunk/; revision=25675
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/e-itip-control.c | 12 |
1 files changed, 7 insertions, 5 deletions
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")); |