diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2016-06-06 22:20:27 +0200 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2016-06-06 22:20:27 +0200 |
| commit | de2f973fba6a97eec9caee2e646127ba543a4c89 (patch) | |
| tree | 3ed9d4e3ac0cabcce6978cc13c6dfce62aecac20 | |
| parent | 66f99904ed38f109cf04978ed3241a9955cd1da8 (diff) | |
Fix segfault when using include with *
This should fix the issue #681
| -rw-r--r-- | sway/config.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sway/config.c b/sway/config.c index 15108123..7530e530 100644 --- a/sway/config.c +++ b/sway/config.c @@ -388,6 +388,11 @@ static bool load_include_config(const char *path, const char *parent_dir, struct char *real_path = realpath(full_path, NULL); free(full_path); + if (real_path == NULL) { + sway_log(L_DEBUG, "%s not found.", path); + return false; + } + // check if config has already been included int j; for (j = 0; j < config->config_chain->length; ++j) { |
