summaryrefslogtreecommitdiffstats
path: root/cmd-save-buffer.c
diff options
context:
space:
mode:
authorThomas Adam <thomas@xteddy.org>2017-01-06 14:01:15 +0000
committerThomas Adam <thomas@xteddy.org>2017-01-06 14:01:15 +0000
commita3428487a787c9ab43cd628338dcc290499891ae (patch)
treea82222b0cd94e22370eaae0ed6a8c679202e10e5 /cmd-save-buffer.c
parent58642011df2ccb02d405626e641ad9f11945a276 (diff)
parentcae0fbbe8c7cc16ac38aa8149ef9b4e2a54bce0e (diff)
Merge branch 'obsd-master'
Diffstat (limited to 'cmd-save-buffer.c')
-rw-r--r--cmd-save-buffer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-save-buffer.c b/cmd-save-buffer.c
index 4d36a6ae..59ba0b89 100644
--- a/cmd-save-buffer.c
+++ b/cmd-save-buffer.c
@@ -99,7 +99,7 @@ cmd_save_buffer_exec(struct cmd *self, struct cmdq_item *item)
if (c != NULL && c->session == NULL && c->cwd != NULL)
cwd = c->cwd;
- else if ((s = c->session) != NULL && s->cwd != NULL)
+ else if (c != NULL && (s = c->session) != NULL && s->cwd != NULL)
cwd = s->cwd;
else
cwd = ".";