mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 18:11:05 -05:00
egl: if texture_pixmap_x11_create fails free priv data
This makes sure the egl winsys frees the private egl_tex_pixmap state if in _cogl_winsys_texture_pixmap_x11_create if there is a failure to create an EGLImage. Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
parent
83db796744
commit
6d79657f76
@ -1582,7 +1582,10 @@ _cogl_winsys_texture_pixmap_x11_create (CoglTexturePixmapX11 *tex_pixmap)
|
|||||||
(EGLClientBuffer)tex_pixmap->pixmap,
|
(EGLClientBuffer)tex_pixmap->pixmap,
|
||||||
attribs);
|
attribs);
|
||||||
if (egl_tex_pixmap->image == EGL_NO_IMAGE_KHR)
|
if (egl_tex_pixmap->image == EGL_NO_IMAGE_KHR)
|
||||||
return FALSE;
|
{
|
||||||
|
g_free (egl_tex_pixmap);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
texture_format = (tex_pixmap->depth >= 32 ?
|
texture_format = (tex_pixmap->depth >= 32 ?
|
||||||
COGL_PIXEL_FORMAT_RGBA_8888_PRE :
|
COGL_PIXEL_FORMAT_RGBA_8888_PRE :
|
||||||
|
Loading…
Reference in New Issue
Block a user