Skip to content

Commit

Permalink
Check if manager->proxy is NULL
Browse files Browse the repository at this point in the history
  • Loading branch information
yetist authored and raveit65 committed Nov 15, 2018
1 parent a34f531 commit b9bd3f6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions mate-panel/libpanel-util/panel-session-manager.c
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand Down

0 comments on commit b9bd3f6

Please sign in to comment.