diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-28 00:39:04 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-28 00:39:04 +0800 |
commit | 915f33a5b1559030cfb3d5b90f7494478ea030a6 (patch) | |
tree | 55ab8e8d55be192ce652ece01840660d97272246 /calendar | |
parent | 9cbc19e94931c69e93e0e8e3847d017568bd0979 (diff) | |
download | gsoc2013-evolution-915f33a5b1559030cfb3d5b90f7494478ea030a6.tar.gz gsoc2013-evolution-915f33a5b1559030cfb3d5b90f7494478ea030a6.tar.zst gsoc2013-evolution-915f33a5b1559030cfb3d5b90f7494478ea030a6.zip |
Bug 628136 - update_query_async() should not free the message struct
Diffstat (limited to 'calendar')
-rw-r--r-- | 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 29b92cb8c6..4d7d64d3ba 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); |