diff options
author | Milan Crha <mcrha@redhat.com> | 2011-09-15 20:54:31 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2011-09-15 20:54:31 +0800 |
commit | 6ea72f4fe7cd9ed44660589bf13eb153007cb62e (patch) | |
tree | 7ec8cfe7d4816ade43eb9a76542fa323b219bb1b /calendar | |
parent | 5817e1ffb9bbe8449cc1881e2887f1a615cbea69 (diff) | |
download | gsoc2013-evolution-6ea72f4fe7cd9ed44660589bf13eb153007cb62e.tar.gz gsoc2013-evolution-6ea72f4fe7cd9ed44660589bf13eb153007cb62e.tar.zst gsoc2013-evolution-6ea72f4fe7cd9ed44660589bf13eb153007cb62e.zip |
Bug #659125 - Reference counting issues in calendar
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/gui/dialogs/comp-editor.c | 2 | ||||
-rw-r--r-- | calendar/gui/e-cal-model.c | 23 |
2 files changed, 20 insertions, 5 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 1d5a45af31..5b3b520635 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -1586,6 +1586,8 @@ comp_editor_dispose (GObject *object) g_signal_handlers_disconnect_matched ( G_OBJECT (store), G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL, object); + g_object_unref (priv->attachment_view); + priv->attachment_view = NULL; } /* We want to destroy the pages after the widgets get destroyed, diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 0c8c59bb9d..b7b56ebd10 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2149,6 +2149,20 @@ typedef struct { icalcomponent *icalcomp; } RecurrenceExpansionData; +static void +free_rdata (gpointer data) +{ + RecurrenceExpansionData *rdata = data; + + if (!rdata) + return; + + g_object_unref (rdata->client); + g_object_unref (rdata->view); + g_object_unref (rdata->model); + g_free (rdata); +} + static gboolean add_instance_cb (ECalComponent *comp, time_t instance_start, @@ -2308,13 +2322,12 @@ process_added (ECalClientView *view, if (client_data) { RecurrenceExpansionData *rdata = g_new0 (RecurrenceExpansionData, 1); - rdata->client = client; - rdata->view = view; - rdata->model = model; - rdata->icalcomp = l->data; + rdata->client = g_object_ref (client); + rdata->view = g_object_ref (view); + rdata->model = g_object_ref (model); e_cal_client_generate_instances_for_object (rdata->client, l->data, priv->start, priv->end, client_data->cancellable, - (ECalRecurInstanceFn) add_instance_cb, rdata, g_free); + (ECalRecurInstanceFn) add_instance_cb, rdata, free_rdata); } } else { e_table_model_pre_change (E_TABLE_MODEL (model)); |