aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/event-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs/event-editor.c')
-rw-r--r--calendar/gui/dialogs/event-editor.c28
1 files changed, 23 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/event-editor.c b/calendar/gui/dialogs/event-editor.c
index 785fe5c357..5f46bb1222 100644
--- a/calendar/gui/dialogs/event-editor.c
+++ b/calendar/gui/dialogs/event-editor.c
@@ -332,12 +332,30 @@ event_editor_finalize (GObject *object)
ee = EVENT_EDITOR (object);
priv = ee->priv;
- g_object_unref (priv->event_page);
- g_object_unref (priv->recur_page);
- g_object_unref (priv->meet_page);
- g_object_unref (priv->sched_page);
+ if (priv->event_page) {
+ g_object_unref (priv->event_page);
+ priv->event_page = NULL;
+ }
+
+ if (priv->recur_page) {
+ g_object_unref (priv->recur_page);
+ priv->recur_page = NULL;
+ }
+
+ if (priv->meet_page) {
+ g_object_unref (priv->meet_page);
+ priv->meet_page = NULL;
+ }
+
+ if (priv->sched_page) {
+ g_object_unref (priv->sched_page);
+ priv->sched_page = NULL;
+ }
- g_object_unref (priv->model);
+ if (priv->model) {
+ g_object_unref (priv->model);
+ priv->model = NULL;
+ }
g_free (priv);