From 0941a2b3ec568323b23e69993c88eebe8529c966 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Tue, 5 Jun 2012 14:55:11 -0500 Subject: bugfix: in machine_sleep_with_context(), don't call the proxy method if we don't have a proxy --- src/device-menu-mgr.c | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src') 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 */ -- cgit v1.2.3