egl/surfaceless: Add error checking to create image

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29344>
This commit is contained in:
Lucas Fryzek
2024-06-18 12:43:49 +01:00
committed by Marge Bot
parent cf2b156f2e
commit 4009709bc3

View File

@@ -91,8 +91,11 @@ surfaceless_image_get_buffers(__DRIdrawable *driDrawable, unsigned int format,
if (buffer_mask & __DRI_IMAGE_BUFFER_FRONT) {
if (!dri2_surf->front)
if (!dri2_surf->front) {
dri2_surf->front = surfaceless_alloc_image(dri2_dpy, dri2_surf);
if (!dri2_surf->front)
return 0;
}
buffers->image_mask |= __DRI_IMAGE_BUFFER_FRONT;
buffers->front = dri2_surf->front;