diff options
author | Robert Ancell <robert.ancell@canonical.com> | 2017-02-22 12:01:11 +1300 |
---|---|---|
committer | Robert Ancell <robert.ancell@canonical.com> | 2017-02-22 12:01:11 +1300 |
commit | 920044dcd82effcec030574293182d3236adc934 (patch) | |
tree | ded91407e543c50c0be3daab722999b7594a3c1d | |
parent | 8ea0df8e699e163b9e8ad864148b8b97cee3a46f (diff) | |
download | lightdm-git-920044dcd82effcec030574293182d3236adc934.tar.gz |
Fix logic that checked if a session was being stopped
-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); } |