Do not use NULL client when source-file finishes, GitHub issue 2707.

pull/2755/head
nicm 2021-06-10 07:53:19 +00:00
parent 1bbdd2aba2
commit 77bd6b9ec3
1 changed files with 3 additions and 1 deletions

View File

@ -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);