diff options
author | Sven Eden <yamakuzure@gmx.net> | 2017-02-16 08:16:57 +0100 |
---|---|---|
committer | Sven Eden <yamakuzure@gmx.net> | 2017-03-14 10:23:13 +0100 |
commit | 91216a607d510872fe02f82c84558417f26e60c3 (patch) | |
tree | 1d6a327f0459720b64096dfcd47be04492383ec0 /src | |
parent | c190efa0e56ab46fd484e489f31a7622bf041de6 (diff) |
Allow NULL session parameter for manager_get_session_by_pid()
The reason is, that method_create_session() calls that function to
detect whether there is already a running session.
Diffstat (limited to 'src')
-rw-r--r-- | src/login/logind-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/login/logind-core.c b/src/login/logind-core.c index 277e26255..06ca3c1c8 100644 --- a/src/login/logind-core.c +++ b/src/login/logind-core.c @@ -284,7 +284,6 @@ int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session) { int r; assert(m); - assert(session); if (pid < 1) return -EINVAL; @@ -306,7 +305,8 @@ int manager_get_session_by_pid(Manager *m, pid_t pid, Session **session) { if (!s) return 0; - *session = s; + if (session) + *session = s; return 1; } |