From 3710cd696385db0b7eb2bbc72c5dfff5de5ce711 Mon Sep 17 00:00:00 2001 From: thuck Date: Mon, 6 Jun 2016 22:20:27 +0200 Subject: [PATCH] Fix segfault when using include with * This should fix the issue #681 --- sway/config.c | 5 +++++ 1 file changed, 5 insertions(+) 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) {