summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/libpanel-util/panel-session-manager.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mate-panel/libpanel-util/panel-session-manager.c b/mate-panel/libpanel-util/panel-session-manager.c
index 191ca2dd..ef99cad2 100644
--- a/mate-panel/libpanel-util/panel-session-manager.c
+++ b/mate-panel/libpanel-util/panel-session-manager.c
@@ -82,6 +82,9 @@ panel_session_manager_request_logout (PanelSessionManager *manager,
g_return_if_fail (PANEL_IS_SESSION_MANAGER (manager));
+ if (manager->proxy == NULL)
+ return;
+
ret = g_dbus_proxy_call_sync (manager->proxy, "Logout",
g_variant_new ("(u)", mode),
G_DBUS_CALL_FLAGS_NONE,
@@ -105,6 +108,9 @@ panel_session_manager_request_shutdown (PanelSessionManager *manager)
g_return_if_fail (PANEL_IS_SESSION_MANAGER (manager));
+ if (manager->proxy == NULL)
+ return;
+
ret = g_dbus_proxy_call_sync (manager->proxy, "Shutdown",
g_variant_new ("()"),
G_DBUS_CALL_FLAGS_NONE,
@@ -129,6 +135,9 @@ panel_session_manager_is_shutdown_available (PanelSessionManager *manager)
g_return_val_if_fail (PANEL_IS_SESSION_MANAGER (manager), FALSE);
+ if (manager->proxy == NULL)
+ return FALSE;
+
ret = g_dbus_proxy_call_sync (manager->proxy, "CanShutdown",
g_variant_new ("()"),
G_DBUS_CALL_FLAGS_NONE,