mcst-linux-kernel/patches-2024.06.26/mesa-demos-8.5.0/0007-lock-front-buffer-segf...

17 lines
466 B
Diff

--- a/src/egl/opengl/eglkms.c 2021-08-09 14:04:45.904486982 +0300
+++ b/src/egl/opengl/eglkms.c 2021-08-09 14:11:35.264355136 +0300
@@ -238,6 +238,13 @@
eglSwapBuffers(dpy, surface);
bo = gbm_surface_lock_front_buffer(gs);
+ if (bo == NULL) {
+ /* Bug 133874 */
+ fprintf(stderr, "failed to lock front buffer\n");
+ ret = -1;
+ goto egl_terminate;
+ }
+
handle = gbm_bo_get_handle(bo).u32;
stride = gbm_bo_get_stride(bo);