diff options
author | Drew DeVault <sir@cmpwn.com> | 2016-06-06 16:40:10 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2016-06-06 16:40:10 -0400 |
commit | b63b01156acda632498c16cf36b176d2ec362a3d (patch) | |
tree | 3ed9d4e3ac0cabcce6978cc13c6dfce62aecac20 | |
parent | Merge pull request #693 from thuck/variables_corner_cases (diff) | |
parent | Fix segfault when using include with * (diff) | |
download | sway-b63b01156acda632498c16cf36b176d2ec362a3d.tar.gz sway-b63b01156acda632498c16cf36b176d2ec362a3d.tar.zst sway-b63b01156acda632498c16cf36b176d2ec362a3d.zip |
Merge pull request #703 from thuck/variables_corner_cases
Fix segfault when using include with *
-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 | |||
388 | char *real_path = realpath(full_path, NULL); | 388 | char *real_path = realpath(full_path, NULL); |
389 | free(full_path); | 389 | free(full_path); |
390 | 390 | ||
391 | if (real_path == NULL) { | ||
392 | sway_log(L_DEBUG, "%s not found.", path); | ||
393 | return false; | ||
394 | } | ||
395 | |||
391 | // check if config has already been included | 396 | // check if config has already been included |
392 | int j; | 397 | int j; |
393 | for (j = 0; j < config->config_chain->length; ++j) { | 398 | for (j = 0; j < config->config_chain->length; ++j) { |