summaryrefslogtreecommitdiff
path: root/src/logind-session.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/logind-session.c')
-rw-r--r--src/logind-session.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/logind-session.c b/src/logind-session.c
index 9fcbf460a3..cbde810502 100644
--- a/src/logind-session.c
+++ b/src/logind-session.c
@@ -111,6 +111,9 @@ int session_save(Session *s) {
assert(s);
+ if (!s->started)
+ return 0;
+
r = safe_mkdir("/run/systemd/sessions", 0755, 0, 0);
if (r < 0)
goto finish;