[evolution-data-server] libecal: Don’t emit a war ning on a dropped D-Bus connection in dispose
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] libecal: Don’t emit a war ning on a dropped D-Bus connection in dispose
- Date: Thu, 10 Apr 2014 08:49:24 +0000 (UTC)
commit 964e77bc4356b7f0762f26b2972d5c9dc1ee613e
Author: Philip Withnall <philip tecnocode co uk>
Date: Thu Apr 10 09:46:59 2014 +0100
libecal: Don’t emit a warning on a dropped D-Bus connection in dispose
See commit e31aae9c123da33a5613fa77cba55668e356f9ce.
https://bugzilla.gnome.org/show_bug.cgi?id=727784
calendar/libecal/e-cal-client-view.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/calendar/libecal/e-cal-client-view.c b/calendar/libecal/e-cal-client-view.c
index bbcc2b9..9b3d3f3 100644
--- a/calendar/libecal/e-cal-client-view.c
+++ b/calendar/libecal/e-cal-client-view.c
@@ -514,11 +514,17 @@ cal_client_view_dispose_cb (GObject *source_object,
e_gdbus_cal_view_call_dispose_finish (
G_DBUS_PROXY (source_object), result, &local_error);
- if (local_error != NULL) {
+ /* Ignore closed errors, since this callback can be called after the
+ * EBookClientView has been disposed, and hence after the calling code
+ * has dropped its final reference and gone on to clean up other things
+ * (like the dbus-daemon, if it’s a test harness). */
+ if (local_error != NULL &&
+ !g_error_matches (local_error, G_IO_ERROR, G_IO_ERROR_CLOSED)) {
g_dbus_error_strip_remote_error (local_error);
g_warning ("%s: %s", G_STRFUNC, local_error->message);
- g_error_free (local_error);
}
+
+ g_clear_error (&local_error);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]