summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/cmd-load-buffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/tmux/cmd-load-buffer.c')
-rw-r--r--usr.bin/tmux/cmd-load-buffer.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/tmux/cmd-load-buffer.c b/usr.bin/tmux/cmd-load-buffer.c
index 058a85b0b19..3152b326a21 100644
--- a/usr.bin/tmux/cmd-load-buffer.c
+++ b/usr.bin/tmux/cmd-load-buffer.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd-load-buffer.c,v 1.41 2015/12/13 21:53:57 nicm Exp $ */
+/* $OpenBSD: cmd-load-buffer.c,v 1.42 2016/03/05 07:47:52 nicm Exp $ */
/*
* Copyright (c) 2009 Tiago Cunha <me@tiagocunha.org>
@@ -73,9 +73,9 @@ cmd_load_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
return (CMD_RETURN_WAIT);
}
- if (c != NULL && c->session == NULL)
+ if (c != NULL && c->session == NULL && c->cwd != NULL)
cwd = c->cwd;
- else if ((s = c->session) != NULL)
+ else if ((s = c->session) != NULL && s->cwd != NULL)
cwd = s->cwd;
else
cwd = ".";