summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2013-06-30 17:41:37 +0100
committerJon TURNEY <jon.turney@dronecode.org.uk>2013-06-30 17:41:37 +0100
commit27bc9bf634c87ae282e205121bf4507f0c46ba2c (patch)
treeac1916c1cd3f37b9ca11a1c8d40f82758aadc0e2 /src/main.c
parent1a1f5399e69b21e4398b7714a5747060a84c8ea6 (diff)
Handle NULL return from xcwm_context_open() as an error
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main.c b/src/main.c
index fae3121..038f597 100644
--- a/src/main.c
+++ b/src/main.c
@@ -193,6 +193,11 @@ int main(int argc, char **argv)
// create the global xcwm context
context = xcwm_context_open(screen);
+ if (!context)
+ {
+ fprintf(stderr, "Could not create xcwm context\n");
+ exit(0);
+ }
//
xcb_connection_t *connection = xcwm_context_get_connection(context);