diff options
-rw-r--r-- | addressbook/ChangeLog | 3 | ||||
-rw-r--r-- | addressbook/gui/component/e-address-popup.c | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 23c808a9e7..c3c55b67fd 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,5 +1,8 @@ 2001-10-26 Jon Trowbridge <trow@ximian.com> + * gui/component/e-address-popup.c (e_address_popup_destroy): + Cancel any pending queries. + * gui/contact-editor/e-contact-editor.c (close_dialog): Don't assert, but check if ce->app != NULL, since this function can (apparently) get called multiple times. diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c index 506b373066..698bad97aa 100644 --- a/addressbook/gui/component/e-address-popup.c +++ b/addressbook/gui/component/e-address-popup.c @@ -687,6 +687,12 @@ e_address_popup_destroy (GtkObject *obj) if (pop->scheduled_refresh) gtk_idle_remove (pop->scheduled_refresh); + if (pop->query_tag) + e_book_simple_query_cancel (pop->book, pop->query_tag); + + if (pop->book) + gtk_object_unref (GTK_OBJECT (pop->book)); + g_free (pop->name); g_free (pop->email); @@ -1095,6 +1101,12 @@ start_query (EBook *book, gpointer closure) if (pop->query_tag) e_book_simple_query_cancel (book, pop->query_tag); + if (pop->book != book) { + gtk_object_ref (GTK_OBJECT (book)); + gtk_object_unref (GTK_OBJECT (pop->book)); + pop->book = book; + } + pop->query_tag = e_book_name_and_email_query (book, pop->name, pop->email, query_cb, pop); } |