From 3693e89739b8743caaeba22ac57f2fc07404822e Mon Sep 17 00:00:00 2001 From: Matt Coffin Date: Tue, 28 Jan 2020 20:17:42 -0700 Subject: [PATCH] run: Fix segfault on error accessing directory in path v2: styling changes v3: Fix email formatting v4: correct inverted pointer check --- modes/run.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/modes/run.c b/modes/run.c index 26c4aa4..e85d3d5 100644 --- a/modes/run.c +++ b/modes/run.c @@ -85,6 +85,9 @@ void wofi_run_init(struct mode* this, struct map* config) { do { str = realpath(str, NULL); + if(str == NULL) { + continue; + } if(map_contains(paths, str)) { free(str); continue;