From 6143e926a5071b8317f0d25c8ef43d5d84b80eda Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 27 Jul 2007 06:31:04 +0000 Subject: 2007-07-27 mcrha Fix for bug #457394 svn path=/trunk/; revision=33858 --- calendar/ChangeLog | 9 +++++++++ calendar/gui/e-calendar-table.c | 5 +++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 4168d1ce67..3a77b0b31d 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,12 @@ +2007-07-27 Milan Crha + + ** Fix for bug #457394 + + * gui/e-calendar-table.c: (hide_completed_rows): + Properly free component with e_cal_model_free_component_data. + * gui/e-calendar-table.c: (show_completed_rows): + Reference 'client' on new component. + 2007-07-27 Hiroyuki Ikezoe * dialogs/cal-prefs-dialog.c: (calendar_prefs_dialog_finalize): diff --git a/calendar/gui/e-calendar-table.c b/calendar/gui/e-calendar-table.c index 88952f9b7a..826075fe72 100644 --- a/calendar/gui/e-calendar-table.c +++ b/calendar/gui/e-calendar-table.c @@ -1423,7 +1423,8 @@ hide_completed_rows (ECalModel *model, GList *clients_list, char *hide_sexp, GPt pos = get_position_in_array (comp_objects, comp_data); e_table_model_row_deleted (E_TABLE_MODEL (model), pos); - g_ptr_array_remove (comp_objects, comp_data); + if (g_ptr_array_remove (comp_objects, comp_data)) + e_cal_model_free_component_data (comp_data); } e_cal_component_free_id (id); g_object_unref (comp); @@ -1460,7 +1461,7 @@ show_completed_rows (ECalModel *model, GList *clients_list, char *show_sexp, GPt if (!(e_cal_model_get_component_for_uid (model, id))) { e_table_model_pre_change (E_TABLE_MODEL (model)); comp_data = g_new0 (ECalModelComponent, 1); - comp_data->client = client; + comp_data->client = g_object_ref (client); comp_data->icalcomp = icalcomponent_new_clone (m->data); e_cal_model_set_instance_times (comp_data, e_cal_model_get_timezone (model)); -- cgit v1.2.3