summaryrefslogtreecommitdiffstats
path: root/cmd-queue.c
diff options
context:
space:
mode:
authornicm <nicm>2019-05-25 10:46:55 +0000
committernicm <nicm>2019-05-25 10:46:55 +0000
commit207789dc2d02467a06df82ca9fd58a9ebd4279ba (patch)
tree268cc84995a9ac86479c9a2e6ac6a5d4d7093aef /cmd-queue.c
parentd7586d3d65bb1361928205751ea7a69f69a4aa87 (diff)
Client name can actually be NULL, so use address in that case.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r--cmd-queue.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/cmd-queue.c b/cmd-queue.c
index c707dd7b..f08d7c02 100644
--- a/cmd-queue.c
+++ b/cmd-queue.c
@@ -36,7 +36,10 @@ cmdq_name(struct client *c)
if (c == NULL)
return ("<global>");
- xsnprintf(s, sizeof s, "<%s>", c->name);
+ if (c->name != NULL)
+ xsnprintf(s, sizeof s, "<%s>", c->name);
+ else
+ xsnprintf(s, sizeof s, "<%p>", c);
return (s);
}