From 6d45ed28597a85c6b5dfa49aeeaf3911da76cf77 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Thu, 14 Aug 2003 07:18:18 +0000 Subject: Chain. 2003-08-12 Hans Petter Jansson * backend/ebook/e-destination.c (e_destination_dispose): Chain. * gui/component/e-address-widget.c (e_address_widget_destroy): Chain. Prevent double frees. Prevent double GSource removal. * gui/component/e-cardlist-model.c (e_cardlist_model_class_init): Store parent class. (e_cardlist_model_dispose): Chain. Prevent double frees and unrefs. * gui/contact-editor/e-contact-editor-address.c (e_contact_editor_address_dispose): Chain. * gui/contact-editor/e-contact-editor-fullname.c (e_contact_editor_fullname_dispose): Chain. * gui/contact-list-editor/e-contact-list-editor.c (e_contact_list_editor_dispose): Chain. * gui/contact-list-editor/e-contact-list-model.c (contact_list_model_destroy): Chain. Prevent double frees and unrefs. * gui/widgets/e-addressbook-reflow-adapter.c (addressbook_dispose): Chain. (addressbook_finalize): Chain. * gui/widgets/e-addressbook-table-adapter.c (addressbook_dispose): Chain. * gui/widgets/e-addressbook-treeview-adapter.c (addressbook_destroy): Chain. Prevent double free. * gui/widgets/gal-view-minicard.c (gal_view_minicard_dispose): Chain. Prevent double free and detach. * gui/widgts/gal-view-treeview.c (gal_view_treeview_dispose): Chain. Prevent double free and detach. * printins/e-contact-print-style-editor.c (e_contact_print_stule_editor_destroy): Chain. Prevent double unref. svn path=/trunk/; revision=22229 --- addressbook/gui/contact-list-editor/e-contact-list-editor.c | 3 ++- addressbook/gui/contact-list-editor/e-contact-list-model.c | 11 ++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) (limited to 'addressbook/gui/contact-list-editor') diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c index e53ebf6786..39f251f5ee 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c @@ -311,7 +311,8 @@ e_contact_list_editor_init (EContactListEditor *editor) static void e_contact_list_editor_dispose (GObject *object) { - /* XXX need to call parent dispose */ + if (G_OBJECT_CLASS (parent_class)->dispose) + (* G_OBJECT_CLASS (parent_class)->dispose) (object); } typedef struct { diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c index 6cad1bd9bf..89354aaece 100644 --- a/addressbook/gui/contact-list-editor/e-contact-list-model.c +++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c @@ -85,13 +85,18 @@ contact_list_model_destroy (GtkObject *o) EContactListModel *model = E_CONTACT_LIST_MODEL (o); int i; - for (i = 0; i < model->data_count; i ++) { - g_object_unref (model->data[i]); + if (model->data != NULL) { + for (i = 0; i < model->data_count; i ++) { + g_object_unref (model->data[i]); + } + g_free (model->data); + model->data = NULL; } - g_free (model->data); model->data_count = 0; model->data_alloc = 0; + + (* GTK_OBJECT_CLASS (parent_class)->destroy) (o); } static void -- cgit v1.2.3