summaryrefslogtreecommitdiff
path: root/dmenu.c
diff options
context:
space:
mode:
Diffstat (limited to 'dmenu.c')
-rw-r--r--dmenu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/dmenu.c b/dmenu.c
index 0e7b70b..e926eca 100644
--- a/dmenu.c
+++ b/dmenu.c
@@ -480,7 +480,7 @@ readstdin(void)
}
if (items)
items[i].text = NULL;
- inputw = TEXTW(items[imax].text);
+ inputw = items ? TEXTW(items[imax].text) : 0;
lines = MIN(lines, i);
}