diff options
author | nicm <nicm> | 2017-04-22 06:27:15 +0000 |
---|---|---|
committer | nicm <nicm> | 2017-04-22 06:27:15 +0000 |
commit | 30348edc7c0e3fd7afa545efbe48cdad69102e65 (patch) | |
tree | 509e7f16d5eb05bbb09ab57509b3d461b5b54b26 /cmd-if-shell.c | |
parent | 59ff9b812827a7a3ba4ded5a911a93fc08bc3586 (diff) | |
download | rtmux-30348edc7c0e3fd7afa545efbe48cdad69102e65.tar.gz rtmux-30348edc7c0e3fd7afa545efbe48cdad69102e65.tar.bz2 rtmux-30348edc7c0e3fd7afa545efbe48cdad69102e65.zip |
Fix if-shell without a client (so in the config file). Reported by Theo
Buehler.
Diffstat (limited to 'cmd-if-shell.c')
-rw-r--r-- | cmd-if-shell.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd-if-shell.c b/cmd-if-shell.c index fafb8cee..4a93885b 100644 --- a/cmd-if-shell.c +++ b/cmd-if-shell.c @@ -120,7 +120,8 @@ cmd_if_shell_exec(struct cmd *self, struct cmdq_item *item) cdata->cmd_else = NULL; cdata->client = item->client; - cdata->client->references++; + if (cdata->client != NULL) + cdata->client->references++; if (!args_has(args, 'b')) cdata->item = item; @@ -193,7 +194,8 @@ cmd_if_shell_free(void *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_if); |