diff options
author | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-24 22:13:42 +0100 |
---|---|---|
committer | Mikkel Oscar Lyderik <mikkeloscar@gmail.com> | 2016-03-24 22:20:25 +0100 |
commit | 938ff29b7b14d9840a92acb1d1ee4192bfc8e89e (patch) | |
tree | 9ed266fe8b9ab0f720d1defb28f085b26bf9cd98 /sway/main.c | |
parent | 06107bb44eddec993354883436767b931f2aa4d7 (diff) |
Gracefully exit when config is not found
This makes sure that sway will gracefully exit if the config is not
found or sway is unable to read it.
Diffstat (limited to 'sway/main.c')
-rw-r--r-- | sway/main.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sway/main.c b/sway/main.c index eef1ad19..c4a5d497 100644 --- a/sway/main.c +++ b/sway/main.c @@ -211,8 +211,9 @@ int main(int argc, char **argv) { } if (!load_config(config_path)) { - sway_log(L_ERROR, "Error(s) loading config!"); + sway_terminate(EXIT_FAILURE); } + if (config_path) { free(config_path); } |