aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar thuck <denisdoria@gmail.com>2016-06-06 22:20:27 +0200
committerLibravatar thuck <denisdoria@gmail.com>2016-06-06 22:20:27 +0200
commit3710cd696385db0b7eb2bbc72c5dfff5de5ce711 (patch)
tree3ed9d4e3ac0cabcce6978cc13c6dfce62aecac20
parentMerge pull request #693 from thuck/variables_corner_cases (diff)
downloadsway-3710cd696385db0b7eb2bbc72c5dfff5de5ce711.tar.gz
sway-3710cd696385db0b7eb2bbc72c5dfff5de5ce711.tar.zst
sway-3710cd696385db0b7eb2bbc72c5dfff5de5ce711.zip
Fix segfault when using include with *
This should fix the issue #681
-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) {