From 9143022e877a1b9b3527ed3b977ed131aa486d4f Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Sat, 27 Jan 2001 03:40:54 +0000 Subject: Fixed a crash that could happen when destroying a control without any ical component in it. svn path=/trunk/; revision=7846 --- calendar/ChangeLog | 6 ++++++ calendar/gui/e-itip-control.c | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 03aa1930d9..fd7ca2f6a1 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2001-01-26 Ettore Perazzoli + + * gui/e-itip-control.c (itip_control_destroy_cb): Don't attempt to + call `icalcomponent_remove_component()' on a NULL component or a + NULL subcomponent. + 2001-01-25 Damon Chaplin * gui/tag-calendar.c: don't tag the calendar if no dates are shown. diff --git a/calendar/gui/e-itip-control.c b/calendar/gui/e-itip-control.c index b72637137f..0fb6c4eef1 100644 --- a/calendar/gui/e-itip-control.c +++ b/calendar/gui/e-itip-control.c @@ -114,9 +114,10 @@ itip_control_destroy_cb (GtkObject *object, gtk_object_unref (GTK_OBJECT (priv->xml)); gtk_object_unref (GTK_OBJECT (priv->xml2)); - icalcomponent_remove_component (priv->main_comp, priv->comp); - if (priv->main_comp != NULL) { + if (priv->comp != NULL) + icalcomponent_remove_component (priv->main_comp, priv->comp); + icalcomponent_free (priv->main_comp); } -- cgit v1.2.3