From 207789dc2d02467a06df82ca9fd58a9ebd4279ba Mon Sep 17 00:00:00 2001 From: nicm Date: Sat, 25 May 2019 10:46:55 +0000 Subject: [PATCH] Client name can actually be NULL, so use address in that case. --- cmd-queue.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 (""); - 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); }