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

pull/1758/head
nicm 2019-05-25 10:46:55 +00:00
parent d7586d3d65
commit 207789dc2d
1 changed files with 4 additions and 1 deletions

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