diff options
author | Ian Fan <ianfan0@gmail.com> | 2018-09-24 18:42:25 +0100 |
---|---|---|
committer | Ian Fan <ianfan0@gmail.com> | 2018-09-28 13:48:59 +0100 |
commit | 312d009f656e86401cda1c6198b929e4cbd85d2f (patch) | |
tree | 4ac796d0f654d29416a1906e70b05d79e1a0641a /swaybar/main.c | |
parent | 02df1e2b1b4306481f8e1023d99fb568095a89b3 (diff) |
swaybar: fail if bar id is invalid
Diffstat (limited to 'swaybar/main.c')
-rw-r--r-- | swaybar/main.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/swaybar/main.c b/swaybar/main.c index 60e4b37c..d2c579db 100644 --- a/swaybar/main.c +++ b/swaybar/main.c @@ -96,7 +96,10 @@ int main(int argc, char **argv) { signal(SIGTERM, sig_handler); - bar_setup(&swaybar, socket_path, bar_id); + if (!bar_setup(&swaybar, socket_path, bar_id)) { + free(socket_path); + return 1; + } free(socket_path); free(bar_id); |