diff options
author | S. Gilles <sgilles@math.umd.edu> | 2016-06-28 01:11:50 -0400 |
---|---|---|
committer | Hiltjo Posthuma <hiltjo@codemadness.org> | 2016-06-28 17:51:28 +0200 |
commit | 76eb5783046cf89ba6b7e9f8cdab35fe86d07a82 (patch) | |
tree | 2d8d2ae771a654950d9f212e26ba792a1d8f3e88 | |
parent | 44c7de3dcf49ee568863f55610f40c7a05b4dfe7 (diff) |
fix: Do not crash on e.g. dmenu < /dev/null
-rw-r--r-- | dmenu.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -480,7 +480,7 @@ readstdin(void) | |||
480 | } | 480 | } |
481 | if (items) | 481 | if (items) |
482 | items[i].text = NULL; | 482 | items[i].text = NULL; |
483 | inputw = TEXTW(items[imax].text); | 483 | inputw = items ? TEXTW(items[imax].text) : 0; |
484 | lines = MIN(lines, i); | 484 | lines = MIN(lines, i); |
485 | } | 485 | } |
486 | 486 | ||