diff options
author | Rodrigo Moya <rodrigo@ximian.com> | 2002-06-04 02:00:21 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@src.gnome.org> | 2002-06-04 02:00:21 +0800 |
commit | 1d8e220e443a123ee4fb9f25aa92e5c9bbc42463 (patch) | |
tree | 6ff774f4fa276bd5afe432e9e7285d2693320622 /calendar | |
parent | d0330caab5267f7401e89e07479fda4657793a65 (diff) | |
download | gsoc2013-evolution-1d8e220e443a123ee4fb9f25aa92e5c9bbc42463.tar gsoc2013-evolution-1d8e220e443a123ee4fb9f25aa92e5c9bbc42463.tar.gz gsoc2013-evolution-1d8e220e443a123ee4fb9f25aa92e5c9bbc42463.tar.bz2 gsoc2013-evolution-1d8e220e443a123ee4fb9f25aa92e5c9bbc42463.tar.lz gsoc2013-evolution-1d8e220e443a123ee4fb9f25aa92e5c9bbc42463.tar.xz gsoc2013-evolution-1d8e220e443a123ee4fb9f25aa92e5c9bbc42463.tar.zst gsoc2013-evolution-1d8e220e443a123ee4fb9f25aa92e5c9bbc42463.zip |
keep a reference to the Query object, to avoid crashes when the queries
2002-06-03 Rodrigo Moya <rodrigo@ximian.com>
* pcs/query.c: keep a reference to the Query object, to avoid
crashes when the queries are destroyed before finishing processing.
Fixes #25056.
svn path=/trunk/; revision=17080
Diffstat (limited to 'calendar')
-rw-r--r-- | calendar/ChangeLog | 6 | ||||
-rw-r--r-- | calendar/pcs/query.c | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/calendar/ChangeLog b/calendar/ChangeLog index de08d34644..91803e672f 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,9 @@ +2002-06-03 Rodrigo Moya <rodrigo@ximian.com> + + * pcs/query.c: keep a reference to the Query object, to avoid + crashes when the queries are destroyed before finishing processing. + Fixes #25056. + 2002-05-26 JP Rosevear <jpr@ximian.com> * gui/dialogs/comp-editor.h: update proto diff --git a/calendar/pcs/query.c b/calendar/pcs/query.c index 2006157e58..8e952a5727 100644 --- a/calendar/pcs/query.c +++ b/calendar/pcs/query.c @@ -1194,6 +1194,8 @@ process_components_cb (gpointer data) g_source_remove (priv->timeout_id); priv->timeout_id = 0; + bonobo_object_ref (BONOBO_OBJECT (query)); + while (priv->pending_uids) { g_assert (priv->n_pending > 0); @@ -1211,15 +1213,11 @@ process_components_cb (gpointer data) g_list_free_1 (l); - bonobo_object_ref (BONOBO_OBJECT (query)); - match_component (query, uid, TRUE, priv->pending_total - priv->n_pending, priv->pending_total); - bonobo_object_unref (BONOBO_OBJECT (query)); - g_free (uid); /* run the main loop, for not blocking */ @@ -1227,6 +1225,10 @@ process_components_cb (gpointer data) gtk_main_iteration (); } + bonobo_object_unref (BONOBO_OBJECT (query)); + if (!priv || !priv->ql) + return FALSE; + /* notify listener that the query ended */ priv->state = QUERY_DONE; |