Fail gracefully when the gc cannot be created

We now only log an error but do not exit when creating the graphics
context fails. While, if this happens, rendering will likely be wrong,
this is still better than terminating the user's session entirely due
to a rendering problem, potentially causing data loss.

relates to #2094
next
Ingo Bürk 2015-12-03 18:59:35 +01:00
parent 256007442f
commit 35a4e22f4a
1 changed files with 1 additions and 2 deletions

View File

@ -47,8 +47,7 @@ void draw_util_surface_init(xcb_connection_t *conn, surface_t *surface, xcb_draw
xcb_generic_error_t *error = xcb_request_check(conn, gc_cookie);
if (error != NULL) {
ELOG("Could not create graphical context. Error code: %d\n", error->error_code);
exit(EXIT_FAILURE);
ELOG("Could not create graphical context. Error code: %d. Please report this bug.\n", error->error_code);
}
#ifdef CAIRO_SUPPORT