aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs/query.c
diff options
context:
space:
mode:
Diffstat (limited to 'calendar/pcs/query.c')
-rw-r--r--calendar/pcs/query.c10
1 files changed, 6 insertions, 4 deletions
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;