From 728af30909db2d46bcbf019c51af53a2b40fe15d Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Wed, 20 Jul 2005 15:40:54 +0000 Subject: Fixed a memory leak and a crash when start date does is not present. 2005-07-20 Chenthill Palanisamy * itip-formatter.c: (format_itip_object): Fixed a memory leak and a crash when start date does is not present. svn path=/trunk/; revision=29820 --- plugins/itip-formatter/itip-formatter.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/itip-formatter/itip-formatter.c') diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index 714ffebe05..a090e33025 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -1685,7 +1685,7 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject icalcomp = e_cal_component_get_icalcomponent (pitip->comp); /* Set the recurrence id */ - if (check_is_instance (icalcomp)) { + if (check_is_instance (icalcomp) && datetime.value) { ECalComponentRange *recur_id; *datetime.value = icaltime_convert_to_zone (*datetime.value, to_zone); @@ -1695,8 +1695,8 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject recur_id->type = E_CAL_COMPONENT_RANGE_SINGLE; recur_id->datetime = datetime; e_cal_component_set_recurid (pitip->comp, recur_id); - } - + } else + e_cal_component_free_datetime (&datetime); e_cal_component_get_dtend (pitip->comp, &datetime); pitip->end_time = 0; -- cgit