From a7abb9ea6d65e7b5b3278f70d66199bb69861503 Mon Sep 17 00:00:00 2001 From: Jon Trowbridge Date: Mon, 29 Oct 2001 23:39:32 +0000 Subject: We were using book_data->book_view immediately after unrefing it. 2001-10-29 Jon Trowbridge * gui/component/select-names/e-select-names-completion.c (e_select_names_completion_destroy): We were using book_data->book_view immediately after unrefing it. Reordered the code a bit to avoid this. svn path=/trunk/; revision=14382 --- addressbook/ChangeLog | 7 +++++++ .../gui/component/select-names/e-select-names-completion.c | 11 ++++++++--- 2 files changed, 15 insertions(+), 3 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index cc4d49d593..238e55a82f 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,10 @@ +2001-10-29 Jon Trowbridge + + * gui/component/select-names/e-select-names-completion.c + (e_select_names_completion_destroy): We were using + book_data->book_view immediately after unrefing it. Reordered the + code a bit to avoid this. + 2001-10-29 Chris Toshok * backend/pas/pas-book-factory.h: add prototype for diff --git a/addressbook/gui/component/select-names/e-select-names-completion.c b/addressbook/gui/component/select-names/e-select-names-completion.c index ff1b06ccbf..8e7843f149 100644 --- a/addressbook/gui/component/select-names/e-select-names-completion.c +++ b/addressbook/gui/component/select-names/e-select-names-completion.c @@ -743,17 +743,22 @@ e_select_names_completion_destroy (GtkObject *object) for (l = comp->priv->book_data; l; l = l->next) { ESelectNamesCompletionBookData *book_data = l->data; - gtk_object_unref (GTK_OBJECT (book_data->book)); - if (book_data->book_view) - gtk_object_unref (GTK_OBJECT (book_data->book_view)); + if (book_data->card_added_tag) { gtk_signal_disconnect (GTK_OBJECT (book_data->book_view), book_data->card_added_tag); book_data->card_added_tag = 0; } + if (book_data->seq_complete_tag) { gtk_signal_disconnect (GTK_OBJECT (book_data->book_view), book_data->seq_complete_tag); book_data->seq_complete_tag = 0; } + + gtk_object_unref (GTK_OBJECT (book_data->book)); + + if (book_data->book_view) + gtk_object_unref (GTK_OBJECT (book_data->book_view)); + g_free (book_data); } g_list_free (comp->priv->book_data); -- cgit v1.2.3