summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2015-03-09 09:48:16 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2015-03-13 21:32:03 +0000
commitd91542cfa716923c4ef62b17ee2b3ae6ddedd8c5 (patch)
tree0a176a276505a0534ce540ef0863b3e0060be757
parent16958057fabdf6a5e5f94d877dc78eef46411cf4 (diff)
downloadgnome-settings-daemon-d91542cfa716923c4ef62b17ee2b3ae6ddedd8c5.tar.gz
power: make sure to set an error when GDBus set_property fails
If we return FALSE, the API is that the error must be set, and GDBus asserts this. Bug: https://bugzilla.gnome.org/show_bug.cgi?id=745920 Bug-Debian: https://bugs.debian.org/775877 Reviewed-by: Bastien Nocera (cherry picked from commit 4e8448ac5c2b7bda014fea602f305d63ffeca1ea)
-rw-r--r--plugins/power/gsd-power-manager.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/power/gsd-power-manager.c b/plugins/power/gsd-power-manager.c
index b31ec6d3..eafa082b 100644
--- a/plugins/power/gsd-power-manager.c
+++ b/plugins/power/gsd-power-manager.c
@@ -2771,6 +2771,8 @@ handle_set_property (GDBusConnection *connection,
/* Check session pointer as a proxy for whether the manager is in the
start or stop state */
if (manager->priv->session == NULL) {
+ g_set_error (error, G_DBUS_ERROR, G_DBUS_ERROR_FAILED,
+ "Manager is starting or stopping");
return FALSE;
}