1
0
Fork 0

cogl/onscreen: Add missing error untrap calls

Every `mtk_x11_error_trap_push()` must be paired
with an `mtk_x11_error_trap_pop[_with_return]()` call
otherwise all future errors will be caught and ignored
even if they shouldn't be.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3328>
This commit is contained in:
Barnabás Pőcze 2023-06-08 03:02:42 +02:00
parent 8d3d8b86e5
commit c58312e249
2 changed files with 2 additions and 0 deletions

View file

@ -133,6 +133,7 @@ cogl_onscreen_glx_allocate (CoglFramebuffer *framebuffer,
COGL_WINSYS_ERROR_CREATE_ONSCREEN, COGL_WINSYS_ERROR_CREATE_ONSCREEN,
"Unable to retrieve the X11 visual of context's " "Unable to retrieve the X11 visual of context's "
"fbconfig"); "fbconfig");
mtk_x11_error_trap_pop (xlib_renderer->xdpy);
return FALSE; return FALSE;
} }

View file

@ -86,6 +86,7 @@ create_xwindow (CoglOnscreenXlib *onscreen_xlib,
COGL_WINSYS_ERROR_CREATE_ONSCREEN, COGL_WINSYS_ERROR_CREATE_ONSCREEN,
"Unable to retrieve the X11 visual of context's " "Unable to retrieve the X11 visual of context's "
"fbconfig"); "fbconfig");
mtk_x11_error_trap_pop (xlib_renderer->xdpy);
return None; return None;
} }