aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2021-05-12 07:08:58 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2021-06-10 09:23:15 +0100
commit8aa34f616fa6723f4a98c435ddcab0ecaaa5b4e7 (patch)
tree31f3767382bf5587cc513edaf23313a62c2e564d
parent5ea6ccbb7f75b6a977fca0751ef0b81b18c375d1 (diff)
downloadrtmux-8aa34f616fa6723f4a98c435ddcab0ecaaa5b4e7.tar.gz
rtmux-8aa34f616fa6723f4a98c435ddcab0ecaaa5b4e7.tar.bz2
rtmux-8aa34f616fa6723f4a98c435ddcab0ecaaa5b4e7.zip
Do not use NULL client when source-file finishes, GitHub issue 2707.
-rw-r--r--cmd-source-file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd-source-file.c b/cmd-source-file.c
index 1da59193..c1eeba58 100644
--- a/cmd-source-file.c
+++ b/cmd-source-file.c
@@ -67,7 +67,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);