Skip to content
Permalink
Browse files

Check if manager->proxy is NULL

  • Loading branch information...
yetist authored and raveit65 committed Nov 15, 2018
1 parent a34f531 commit b9bd3f63367f7b7abf6fc1ef86b5a8edd92d775f
Showing with 9 additions and 0 deletions.
  1. +9 −0 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,

0 comments on commit b9bd3f6

Please sign in to comment.
You can’t perform that action at this time.