From d91542cfa716923c4ef62b17ee2b3ae6ddedd8c5 Mon Sep 17 00:00:00 2001 From: Simon McVittie Date: Mon, 9 Mar 2015 09:48:16 +0000 Subject: 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) --- plugins/power/gsd-power-manager.c | 2 ++ 1 file changed, 2 insertions(+) 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; } -- cgit v1.2.1