set line NULL in dmenu mode

Previously line was uninitialised which resulted in getline ending in
segmentation fault.
This commit is contained in:
Apiote 2019-11-25 13:58:16 +01:00
parent 3c03f89918
commit f2f870f367

View File

@ -34,7 +34,7 @@ void wofi_dmenu_init() {
free(cache); free(cache);
char* line; char* line = NULL;
size_t size = 0; size_t size = 0;
while(getline(&line, &size, stdin) != -1) { while(getline(&line, &size, stdin) != -1) {
char* lf = strchr(line, '\n'); char* lf = strchr(line, '\n');