set line NULL in dmenu mode
Previously line was uninitialised which resulted in getline ending in segmentation fault.
This commit is contained in:
parent
3c03f89918
commit
f2f870f367
@ -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');
|
||||||
|
Loading…
Reference in New Issue
Block a user