[evolution] Bug 628136 - update_query_async() should not free the message struct
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Bug 628136 - update_query_async() should not free the message struct
- Date: Fri, 27 Aug 2010 16:39:27 +0000 (UTC)
commit 915f33a5b1559030cfb3d5b90f7494478ea030a6
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Aug 27 12:39:04 2010 -0400
Bug 628136 - update_query_async() should not free the message struct
calendar/gui/gnome-cal.c | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
---
diff --git a/calendar/gui/gnome-cal.c b/calendar/gui/gnome-cal.c
index 29b92cb..4d7d64d 100644
--- a/calendar/gui/gnome-cal.c
+++ b/calendar/gui/gnome-cal.c
@@ -1067,8 +1067,6 @@ update_query_async (struct _date_query_msg *msg)
real_sexp = adjust_e_cal_view_sexp (gcal, priv->sexp);
if (!real_sexp) {
- g_object_unref (msg->gcal);
- g_slice_free (struct _date_query_msg, msg);
return; /* No time range is set, so don't start a query */
}
@@ -1125,9 +1123,15 @@ try_again:
/* free memory */
g_free (real_sexp);
update_todo_view (gcal);
+}
+static gboolean
+update_query_done (struct _date_query_msg *msg)
+{
g_object_unref (msg->gcal);
g_slice_free (struct _date_query_msg, msg);
+
+ return FALSE;
}
/* Restarts a query for the date navigator in the calendar */
@@ -1142,7 +1146,7 @@ gnome_calendar_update_query (GnomeCalendar *gcal)
msg = g_slice_new0 (struct _date_query_msg);
msg->header.func = (MessageFunc) update_query_async;
- msg->header.done = NULL;
+ msg->header.done = (GSourceFunc) update_query_done;
msg->gcal = g_object_ref (gcal);
message_push ((Message *) msg);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]