[dconf] Don't crash on DBus connection failure
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dconf] Don't crash on DBus connection failure
- Date: Mon, 31 Jan 2011 16:04:19 +0000 (UTC)
commit 3381a536337b69a3ba54543d69624fb2274ffa66
Author: Ryan Lortie <desrt desrt ca>
Date: Mon Jan 31 11:02:35 2011 -0500
Don't crash on DBus connection failure
When adding matches, if we can't connect to DBus, the code will
presently crash. This fixes that.
gsettings/dconfsettingsbackend.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/gsettings/dconfsettingsbackend.c b/gsettings/dconfsettingsbackend.c
index abba2a1..d978646 100644
--- a/gsettings/dconfsettingsbackend.c
+++ b/gsettings/dconfsettingsbackend.c
@@ -518,6 +518,13 @@ add_match_done (GObject *source,
GError *error = NULL;
GVariant *reply;
+ /* couldn't connect to DBus */
+ if (source == NULL)
+ {
+ outstanding_watch_free (watch);
+ return;
+ }
+
reply = g_dbus_connection_call_finish (G_DBUS_CONNECTION (source),
result, &error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]