aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergi Granell <xerpi.g.12@gmail.com>2015-11-13 20:42:45 +0100
committerSergi Granell <xerpi.g.12@gmail.com>2015-11-13 20:42:45 +0100
commita8b18b5159236f5b68e875ddf9ff0d52a0f8ea3c (patch)
tree9fa6154d0ab4762468162201800708165b515257
parent3dbdc40b0e123100e86aec77f77e94350ea0abbd (diff)
Check the client_setup() return value
-rw-r--r--swaybg/main.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/swaybg/main.c b/swaybg/main.c
index af0a1b27..db5af375 100644
--- a/swaybg/main.c
+++ b/swaybg/main.c
@@ -14,7 +14,9 @@ void sway_terminate(void) {
int main(int argc, char **argv) {
init_log(L_INFO);
- state = client_setup();
+ if (!(state = client_setup())) {
+ return -1;
+ }
uint8_t r = 0, g = 0, b = 0;