1
0
mirror of https://github.com/tmux/tmux.git synced 2025-04-10 02:58:50 +00:00

Fix if-shell without a client (so in the config file). Reported by Theo

Buehler.
This commit is contained in:
nicm 2017-04-22 06:27:15 +00:00
parent 59ff9b8128
commit 30348edc7c

View File

@ -120,6 +120,7 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
cdata->cmd_else = NULL;
cdata->client = item->client;
if (cdata->client != NULL)
cdata->client->references++;
if (!args_has(args, 'b'))
@ -193,6 +194,7 @@ cmd_if_shell_free(void *data)
{
struct cmd_if_shell_data *cdata = data;
if (cdata->client != NULL)
server_client_unref(cdata->client);
free(cdata->cmd_else);