aboutsummaryrefslogtreecommitdiff
path: root/cmd-queue.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2020-05-07 05:55:42 +0100
committerNicholas Marriott <nicholas.marriott@gmail.com>2020-05-07 05:55:42 +0100
commit63e17d8cad7be6932ac82703e632f9a91d89b959 (patch)
tree56dbc1d5fe3e3364d42f30b4a0f141c1f8b46c03 /cmd-queue.c
parent66ecb1dff47952cdd0c4e1b36f4ad5fcc4f43c83 (diff)
downloadrtmux-63e17d8cad7be6932ac82703e632f9a91d89b959.tar.gz
rtmux-63e17d8cad7be6932ac82703e632f9a91d89b959.tar.bz2
rtmux-63e17d8cad7be6932ac82703e632f9a91d89b959.zip
Do not use client if NULL, from Thomas Adam.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r--cmd-queue.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmd-queue.c b/cmd-queue.c
index 077599fb..26e2f2f9 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -540,11 +540,12 @@ cmdq_add_message(struct cmdq_item *item)
{
struct client *c = item->client;
struct cmdq_state *state = item->state;
- const char *name = c->name, *key;
+ const char *name, *key;
char *tmp;
tmp = cmd_print(item->cmd);
if (c != NULL) {
+ name = c->name;
if (c->session != NULL && state->event.key != KEYC_NONE) {
key = key_string_lookup_key(state->event.key);
server_add_message("%s key %s: %s", name, key, tmp);