mirror of
https://github.com/tmux/tmux.git
synced 2025-01-12 03:08:46 +00:00
Do not crash when the current session has no window, fixes a bug
reported by Giorgio Lando. Fix from Thomas Adam.
This commit is contained in:
parent
2113115cdd
commit
a4a2c68fa9
2
cmd.c
2
cmd.c
@ -1304,7 +1304,7 @@ cmd_get_default_path(struct cmd_ctx *ctx, const char *cwd)
|
||||
/* Empty or relative path. */
|
||||
if (ctx->cmdclient != NULL && ctx->cmdclient->cwd != NULL)
|
||||
root = ctx->cmdclient->cwd;
|
||||
else if (ctx->curclient != NULL)
|
||||
else if (ctx->curclient != NULL && s->curw != NULL)
|
||||
root = get_proc_cwd(s->curw->window->active->pid);
|
||||
else
|
||||
return (s->cwd);
|
||||
|
Loading…
Reference in New Issue
Block a user