aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-05-23 03:12:49 +0800
committerDan Winship <danw@src.gnome.org>2001-05-23 03:12:49 +0800
commite16ec956d76ab269e645e4c6d2f3eb5fbc01c027 (patch)
treedde10301cbc675d7f47eb39cce3598cc81a5dbf3 /addressbook/backend
parent806c15f6ff9325617091318670b9e0e41fb467ec (diff)
downloadgsoc2013-evolution-e16ec956d76ab269e645e4c6d2f3eb5fbc01c027.tar.gz
gsoc2013-evolution-e16ec956d76ab269e645e4c6d2f3eb5fbc01c027.tar.zst
gsoc2013-evolution-e16ec956d76ab269e645e4c6d2f3eb5fbc01c027.zip
ref the listener for the duration of this function, since emitting
* backend/ebook/e-book-listener.c (e_book_listener_check_queue): ref the listener for the duration of this function, since emitting "responses_queued" may cause it to be unreffed by its EBook in some cases, which could cause the second response_queue check to look at garbage data if it got destroyed. (e_book_listener_destroy): Call g_source_remove if idle_id is set. svn path=/trunk/; revision=9935
Diffstat (limited to 'addressbook/backend')
-rw-r--r--addressbook/backend/ebook/e-book-listener.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-book-listener.c b/addressbook/backend/ebook/e-book-listener.c
index ee4107190b..f9d4f67f97 100644
--- a/addressbook/backend/ebook/e-book-listener.c
+++ b/addressbook/backend/ebook/e-book-listener.c
@@ -33,6 +33,7 @@ struct _EBookListenerPrivate {
static gboolean
e_book_listener_check_queue (EBookListener *listener)
{
+ gtk_object_ref (GTK_OBJECT (listener));
if (listener->priv->response_queue != NULL) {
gtk_signal_emit (GTK_OBJECT (listener),
e_book_listener_signals [RESPONSES_QUEUED]);
@@ -40,9 +41,11 @@ e_book_listener_check_queue (EBookListener *listener)
if (listener->priv->response_queue == NULL) {
listener->priv->idle_id = 0;
+ gtk_object_unref (GTK_OBJECT (listener));
return FALSE;
}
+ gtk_object_unref (GTK_OBJECT (listener));
return TRUE;
}
@@ -624,6 +627,9 @@ e_book_listener_destroy (GtkObject *object)
}
g_list_free (listener->priv->response_queue);
+ if (listener->priv->idle_id)
+ g_source_remove (listener->priv->idle_id);
+
g_free (listener->priv);
GTK_OBJECT_CLASS (e_book_listener_parent_class)->destroy (object);
a>daichi2003-07-242-0/+3 * De-pkg-comment.knu2003-02-212-1/+1 * o Rollback PORTCOMMENT modifications while this feature's implementationlioux2002-11-112-2/+1 * Use PORTCOMMENT in the Makefile, and whack the pkg-comment.adamw2002-11-072-1/+2 * Rename patch-message, which is already a bsd.port.mk target.naddy2002-11-031-3/+1 * Fix correct ports version.nork2002-10-271-2/+2 * upgrade to 2002-2-1ijliao2002-10-254-8/+12 * add manpage (grab from Debian)ijliao2002-09-182-0/+1288 * forgot it in the last commitijliao2001-10-181-0/+1 * targets reworked a lotijliao2001-10-152-8/+35 * Replace the ghostscript55 dependencies with ghostscript-gnu.knu2001-09-121-1/+1 * ${PREFIX}/share/${PORTNAME} --> ${DATADIR}sobomax2001-07-101-1/+1 * More style fixes for ports/textproc.olgeni2001-02-061-1/+1 * enforce not to create gif files and fix pkg-plist.sf2001-02-042-29/+1 * update checksum.sf2001-01-221-1/+1 * Update to 99.2b8.roam2000-12-126-308/+323 * ghostscript5 doesn't exist anymore, so change dependencies to ghostscript55.asami2000-11-251-1/+1