aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorRadek Doulik <rodo@ximian.com>2001-08-05 19:01:43 +0800
committerRadek Doulik <rodo@src.gnome.org>2001-08-05 19:01:43 +0800
commit3eb4762245dd2c8a872f0692071c4772d06bf787 (patch)
tree843b3b38ef521732bb9099c87dee4aeb202584ed /addressbook
parenta654a88b3f078e0cc4b196b22cf678c587412ac8 (diff)
downloadgsoc2013-evolution-3eb4762245dd2c8a872f0692071c4772d06bf787.tar
gsoc2013-evolution-3eb4762245dd2c8a872f0692071c4772d06bf787.tar.gz
gsoc2013-evolution-3eb4762245dd2c8a872f0692071c4772d06bf787.tar.bz2
gsoc2013-evolution-3eb4762245dd2c8a872f0692071c4772d06bf787.tar.lz
gsoc2013-evolution-3eb4762245dd2c8a872f0692071c4772d06bf787.tar.xz
gsoc2013-evolution-3eb4762245dd2c8a872f0692071c4772d06bf787.tar.zst
gsoc2013-evolution-3eb4762245dd2c8a872f0692071c4772d06bf787.zip
set op->listener to NULL to catch possible use of freed op
2001-08-05 Radek Doulik <rodo@ximian.com> * backend/ebook/e-book.c (e_book_do_response_get_view): set op->listener to NULL to catch possible use of freed op (e_book_do_response_get_changes): ditto * backend/ebook/e-book-view-listener.c (e_book_view_listener_check_queue): this callback could be (and indeed is) called from signal emited above, signal handler could call e_book_view_listener_stop, so we need to check if idle is still set and if not we don't want to unref again svn path=/trunk/; revision=11692
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog12
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.c5
-rw-r--r--addressbook/backend/ebook/e-book.c4
3 files changed, 20 insertions, 1 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 4476aeef0b..574018a310 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,15 @@
+2001-08-05 Radek Doulik <rodo@ximian.com>
+
+ * backend/ebook/e-book.c (e_book_do_response_get_view): set
+ op->listener to NULL to catch possible use of freed op
+ (e_book_do_response_get_changes): ditto
+
+ * backend/ebook/e-book-view-listener.c
+ (e_book_view_listener_check_queue): this callback could be (and
+ indeed is) called from signal emited above,
+ signal handler could call e_book_view_listener_stop, so we need to check
+ if idle is still set and if not we don't want to unref again
+
2001-08-04 Christopher James Lahey <clahey@ximian.com>
* backend/ebook/e-card-compare.c (e_card_compare_name): Made it so
diff --git a/addressbook/backend/ebook/e-book-view-listener.c b/addressbook/backend/ebook/e-book-view-listener.c
index 7e0f6d5c29..761cf12281 100644
--- a/addressbook/backend/ebook/e-book-view-listener.c
+++ b/addressbook/backend/ebook/e-book-view-listener.c
@@ -47,7 +47,10 @@ e_book_view_listener_check_queue (EBookViewListener *listener)
e_book_view_listener_signals [RESPONSES_QUEUED]);
}
- if (listener->priv->response_queue == NULL) {
+ /* this callback could be (and indeed is) called from signal emited above,
+ signal handler could call e_book_view_listener_stop, so we need to check
+ if idle is still set and if not we don't want to unref again */
+ if (listener->priv->response_queue == NULL && listener->priv->idle_id != 0) {
listener->priv->idle_id = 0;
bonobo_object_unref (BONOBO_OBJECT (listener));
return FALSE;
diff --git a/addressbook/backend/ebook/e-book.c b/addressbook/backend/ebook/e-book.c
index 9c8111b714..b141a71f43 100644
--- a/addressbook/backend/ebook/e-book.c
+++ b/addressbook/backend/ebook/e-book.c
@@ -290,6 +290,8 @@ e_book_do_response_get_view (EBook *book,
}
bonobo_object_unref(BONOBO_OBJECT(op->listener));
+ op->listener = NULL;
+
g_free (op);
}
@@ -342,6 +344,8 @@ e_book_do_response_get_changes (EBook *book,
}
bonobo_object_unref(BONOBO_OBJECT(op->listener));
+ op->listener = NULL;
+
g_free (op);
}