aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-itip-control.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/e-itip-control.c')
-rw-r--r--calendar/gui/e-itip-control.c5
1 files changed, 3 insertions, 2 deletions
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);
}