aboutsummaryrefslogtreecommitdiff
path: root/src/device-menu-mgr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/device-menu-mgr.c')
-rw-r--r--src/device-menu-mgr.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/device-menu-mgr.c b/src/device-menu-mgr.c
index 0af0af7..20597b0 100644
--- a/src/device-menu-mgr.c
+++ b/src/device-menu-mgr.c
@@ -174,18 +174,16 @@ machine_sleep_from_hibernate (DbusmenuMenuitem * mi G_GNUC_UNUSED,
static void
machine_sleep_with_context (DeviceMenuMgr* self, const gchar* type)
{
- if (self->up_main_proxy == NULL) {
- g_warning("Can not %s as no upower proxy", type);
- }
-
- dbus_g_proxy_begin_call(self->up_main_proxy,
- type,
- NULL,
- NULL,
- NULL,
- G_TYPE_INVALID);
-
- return;
+ if (self->up_main_proxy == NULL)
+ {
+ g_warning("Can not %s as no upower proxy", type);
+ }
+ else
+ {
+ dbus_g_proxy_begin_call (self->up_main_proxy, type,
+ NULL, NULL, NULL,
+ G_TYPE_INVALID);
+ }
}
/* A response to getting the suspend property */