diff options
author | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-06-30 17:41:37 +0100 |
---|---|---|
committer | Jon TURNEY <jon.turney@dronecode.org.uk> | 2013-06-30 17:41:37 +0100 |
commit | 27bc9bf634c87ae282e205121bf4507f0c46ba2c (patch) | |
tree | ac1916c1cd3f37b9ca11a1c8d40f82758aadc0e2 /src/main.c | |
parent | 1a1f5399e69b21e4398b7714a5747060a84c8ea6 (diff) |
Handle NULL return from xcwm_context_open() as an error
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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); |