Client name can actually be NULL, so use address in that case.

This commit is contained in:
nicm 2019-05-25 10:46:55 +00:00
parent d7586d3d65
commit 207789dc2d

View File

@ -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);
}