aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Drew DeVault <sir@cmpwn.com>2016-06-06 16:40:10 -0400
committerLibravatar Drew DeVault <sir@cmpwn.com>2016-06-06 16:40:10 -0400
commitb63b01156acda632498c16cf36b176d2ec362a3d (patch)
tree3ed9d4e3ac0cabcce6978cc13c6dfce62aecac20
parentMerge pull request #693 from thuck/variables_corner_cases (diff)
parentFix segfault when using include with * (diff)
downloadsway-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.c5
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) {