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
This commit is contained in:
parent
256007442f
commit
35a4e22f4a
|
@ -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);
|
xcb_generic_error_t *error = xcb_request_check(conn, gc_cookie);
|
||||||
if (error != NULL) {
|
if (error != NULL) {
|
||||||
ELOG("Could not create graphical context. Error code: %d\n", error->error_code);
|
ELOG("Could not create graphical context. Error code: %d. Please report this bug.\n", error->error_code);
|
||||||
exit(EXIT_FAILURE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CAIRO_SUPPORT
|
#ifdef CAIRO_SUPPORT
|
||||||
|
|
Loading…
Reference in New Issue