mirror of
https://github.com/tmux/tmux.git
synced 2025-04-13 23:08:49 +00:00
Fix if-shell without a client (so in the config file). Reported by Theo
Buehler.
This commit is contained in:
parent
59ff9b8128
commit
30348edc7c
@ -120,7 +120,8 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item)
|
|||||||
cdata->cmd_else = NULL;
|
cdata->cmd_else = NULL;
|
||||||
|
|
||||||
cdata->client = item->client;
|
cdata->client = item->client;
|
||||||
cdata->client->references++;
|
if (cdata->client != NULL)
|
||||||
|
cdata->client->references++;
|
||||||
|
|
||||||
if (!args_has(args, 'b'))
|
if (!args_has(args, 'b'))
|
||||||
cdata->item = item;
|
cdata->item = item;
|
||||||
@ -193,7 +194,8 @@ cmd_if_shell_free(void *data)
|
|||||||
{
|
{
|
||||||
struct cmd_if_shell_data *cdata = data;
|
struct cmd_if_shell_data *cdata = data;
|
||||||
|
|
||||||
server_client_unref(cdata->client);
|
if (cdata->client != NULL)
|
||||||
|
server_client_unref(cdata->client);
|
||||||
|
|
||||||
free(cdata->cmd_else);
|
free(cdata->cmd_else);
|
||||||
free(cdata->cmd_if);
|
free(cdata->cmd_if);
|
||||||
|
Loading…
Reference in New Issue
Block a user