From a6b361e775e0bf6301284391e75dd9af7af340da Mon Sep 17 00:00:00 2001 From: nicm Date: Mon, 17 Jan 2022 10:40:03 +0000 Subject: [PATCH] Do not try to strdup NULL, from seL4 at disroot dot org in GitHub issue 3038. --- popup.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/popup.c b/popup.c index ed6a6bb9..bebc7cc6 100644 --- a/popup.c +++ b/popup.c @@ -668,7 +668,8 @@ popup_display(int flags, enum box_lines lines, struct cmdq_item *item, u_int px, pd = xcalloc(1, sizeof *pd); pd->item = item; pd->flags = flags; - pd->title = xstrdup(title); + if (title != NULL) + pd->title = xstrdup(title); pd->c = c; pd->c->references++;