summaryrefslogtreecommitdiffstats
path: root/popup.c
diff options
context:
space:
mode:
authornicm <nicm>2022-01-17 10:40:03 +0000
committernicm <nicm>2022-01-17 10:40:03 +0000
commita6b361e775e0bf6301284391e75dd9af7af340da (patch)
tree0058127cb014ec81e10131f7e22d7f0ed3ea6128 /popup.c
parentb2b94dcba73a62e2949fb98aee097dbaea658760 (diff)
Do not try to strdup NULL, from seL4 at disroot dot org in GitHub issue
3038.
Diffstat (limited to 'popup.c')
-rw-r--r--popup.c3
1 files changed, 2 insertions, 1 deletions
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++;