fix: Do not crash on e.g. dmenu < /dev/null
This commit is contained in:
parent
44c7de3dcf
commit
76eb578304
1 changed files with 1 additions and 1 deletions
2
dmenu.c
2
dmenu.c
|
@ -480,7 +480,7 @@ readstdin(void)
|
||||||
}
|
}
|
||||||
if (items)
|
if (items)
|
||||||
items[i].text = NULL;
|
items[i].text = NULL;
|
||||||
inputw = TEXTW(items[imax].text);
|
inputw = items ? TEXTW(items[imax].text) : 0;
|
||||||
lines = MIN(lines, i);
|
lines = MIN(lines, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue