aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-10-21 04:58:49 +0800
committerChris Toshok <toshok@src.gnome.org>2002-10-21 04:58:49 +0800
commit0e33447271953845cc301bd51562c9c19f1bb9af (patch)
tree97b397c86d3c1c7397651e29c53ef8472ba418ef /addressbook
parenta28bbcd16f563525e4fc6f489dcb01041ef14826 (diff)
downloadgsoc2013-evolution-0e33447271953845cc301bd51562c9c19f1bb9af.tar
gsoc2013-evolution-0e33447271953845cc301bd51562c9c19f1bb9af.tar.gz
gsoc2013-evolution-0e33447271953845cc301bd51562c9c19f1bb9af.tar.bz2
gsoc2013-evolution-0e33447271953845cc301bd51562c9c19f1bb9af.tar.lz
gsoc2013-evolution-0e33447271953845cc301bd51562c9c19f1bb9af.tar.xz
gsoc2013-evolution-0e33447271953845cc301bd51562c9c19f1bb9af.tar.zst
gsoc2013-evolution-0e33447271953845cc301bd51562c9c19f1bb9af.zip
[ probable fix for #25477, and memory leak fix ] if the dialog isn't in
2002-10-19 Chris Toshok <toshok@ximian.com> [ probable fix for #25477, and memory leak fix ] * gui/contact-editor/e-contact-editor.c (supported_fields_cb): if the dialog isn't in the list of all dialogs it's been destroyed so just return here. * backend/ebook/e-book.c (e_book_do_response_get_supported_fields): plug leak of resp->fields. svn path=/trunk/; revision=18396
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog11
-rw-r--r--addressbook/backend/ebook/e-book.c2
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c5
3 files changed, 18 insertions, 0 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index c67db48937..a5945c9e3c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,14 @@
+2002-10-19 Chris Toshok <toshok@ximian.com>
+
+ [ probable fix for #25477, and memory leak fix ]
+ * gui/contact-editor/e-contact-editor.c (supported_fields_cb): if
+ the dialog isn't in the list of all dialogs it's been destroyed so
+ just return here.
+
+ * backend/ebook/e-book.c
+ (e_book_do_response_get_supported_fields): plug leak of
+ resp->fields.
+
2002-10-15 Dan Winship <danw@ximian.com>
* backend/ebook/e-card.c (e_card_email_match_string): Return right
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c
index cad203ad44..d211496261 100644
--- a/addressbook/backend/ebook/e-book.c
+++ b/addressbook/backend/ebook/e-book.c
@@ -483,6 +483,8 @@ e_book_do_response_get_supported_fields (EBook *book,
((EBookFieldsCallback) op->cb) (book, E_BOOK_STATUS_CANCELLED, NULL, op->closure);
}
+ gtk_object_unref(GTK_OBJECT(resp->fields));
+
e_book_op_free (op);
}
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index f22aaa5487..fa30ec871e 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -1489,6 +1489,11 @@ static void
supported_fields_cb (EBook *book, EBookStatus status,
EList *fields, EContactEditor *ce)
{
+ if (!g_slist_find (all_contact_editors, ce)) {
+ g_warning ("supported_fields_cb called for book that's still around, but contact editor that's been destroyed.");
+ return;
+ }
+
gtk_object_set (GTK_OBJECT (ce),
"writable_fields", fields,
NULL);