diff options
-rw-r--r-- | src/session.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/session.c b/src/session.c index 15598425..9b31bcdc 100644 --- a/src/session.c +++ b/src/session.c @@ -913,6 +913,10 @@ session_stop (Session *session) { g_return_if_fail (session != NULL); + if (session->priv->stopping) + return; + session->priv->stopping = TRUE; + /* Kill remaining processes in our logind session to avoid them leaking * to the user session (they share the same $DISPLAY) */ if (getuid () == 0 && session->priv->login1_session_id) @@ -936,10 +940,6 @@ session_stop (Session *session) return; } - if (session->priv->stopping) - return; - session->priv->stopping = TRUE; - return SESSION_GET_CLASS (session)->stop (session); } |