diff options
author | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-06-10 07:53:20 +0000 |
---|---|---|
committer | Nicholas Marriott <nicm@cvs.openbsd.org> | 2021-06-10 07:53:20 +0000 |
commit | 098cef322105f433cab1f39f93695f04c1cadd0f (patch) | |
tree | 0e1ff93557a41d65583dcf7bf3d772dfa5ac61b9 /usr.bin/tmux/cmd-source-file.c | |
parent | 8d7600ec2cfd24dde9d5c201d004d31ccef0b45c (diff) |
Do not use NULL client when source-file finishes, GitHub issue 2707.
Diffstat (limited to 'usr.bin/tmux/cmd-source-file.c')
-rw-r--r-- | usr.bin/tmux/cmd-source-file.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/tmux/cmd-source-file.c b/usr.bin/tmux/cmd-source-file.c index ab3a5002722..f7478bff099 100644 --- a/usr.bin/tmux/cmd-source-file.c +++ b/usr.bin/tmux/cmd-source-file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd-source-file.c,v 1.48 2020/09/01 09:19:01 nicm Exp $ */ +/* $OpenBSD: cmd-source-file.c,v 1.49 2021/06/10 07:53:19 nicm Exp $ */ /* * Copyright (c) 2008 Tiago Cunha <me@tiagocunha.org> @@ -68,7 +68,9 @@ cmd_source_file_complete(struct client *c, struct cmd_source_file_data *cdata) struct cmdq_item *new_item; if (cfg_finished) { - if (cdata->retval == CMD_RETURN_ERROR && c->session == NULL) + if (cdata->retval == CMD_RETURN_ERROR && + c != NULL && + c->session == NULL) c->retval = 1; new_item = cmdq_get_callback(cmd_source_file_complete_cb, NULL); cmdq_insert_after(cdata->after, new_item); |