aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/dialogs/task-editor.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/gui/dialogs/task-editor.c')
-rw-r--r--calendar/gui/dialogs/task-editor.c22
1 files changed, 18 insertions, 4 deletions
diff --git a/calendar/gui/dialogs/task-editor.c b/calendar/gui/dialogs/task-editor.c
index 8cc4cb0113..b28814f18e 100644
--- a/calendar/gui/dialogs/task-editor.c
+++ b/calendar/gui/dialogs/task-editor.c
@@ -315,11 +315,25 @@ task_editor_finalize (GObject *object)
te = TASK_EDITOR (object);
priv = te->priv;
- g_object_unref (priv->task_page);
- g_object_unref (priv->task_details_page);
- g_object_unref (priv->meet_page);
+ if (priv->task_page) {
+ g_object_unref (priv->task_page);
+ priv->task_page = NULL;
+ }
+
+ if (priv->task_details_page) {
+ g_object_unref (priv->task_details_page);
+ priv->task_details_page = NULL;
+ }
- g_object_unref (priv->model);
+ if (priv->meet_page) {
+ g_object_unref (priv->meet_page);
+ priv->meet_page = NULL;
+ }
+
+ if (priv->model) {
+ g_object_unref (priv->model);
+ priv->model = NULL;
+ }
g_free (priv);