mirror of
https://github.com/tmux/tmux.git
synced 2025-09-02 05:21:10 +00:00
Do not use c->cwd or s->cwd if it is NULL, found by Ben Boeckel.
This commit is contained in:
@ -98,9 +98,9 @@ cmd_save_buffer_exec(struct cmd *self, struct cmd_q *cmdq)
|
||||
goto do_print;
|
||||
}
|
||||
|
||||
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 = ".";
|
||||
|
Reference in New Issue
Block a user