dmenu

my fork of dmenu
Index Commits Files Refs README LICENSE
commit 76eb5783046cf89ba6b7e9f8cdab35fe86d07a82
parent 44c7de3dcf49ee568863f55610f40c7a05b4dfe7
Author: S. Gilles <sgilles@math.umd.edu>
Date:   Tue, 28 Jun 2016 01:11:50 -0400

fix: Do not crash on e.g. dmenu < /dev/null

Diffstat:
Mdmenu.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git 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);
 }