From 678ba0f484171cb95a7582b7b7ecc97c4275432f Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 31 Dec 2020 12:58:40 +1100 Subject: [PATCH] [client] egl: check for EGLImage creation failure --- client/renderers/EGL/texture.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/client/renderers/EGL/texture.c b/client/renderers/EGL/texture.c index a6a3b6c8..d359d432 100644 --- a/client/renderers/EGL/texture.c +++ b/client/renderers/EGL/texture.c @@ -383,6 +383,12 @@ bool egl_texture_update_from_dma(EGL_Texture * texture, const FrameBuffer * fram attribs ); + if (image == EGL_NO_IMAGE) + { + DEBUG_ERROR("failed to create ELGImage for DMA transfer"); + return false; + } + /* bind the texture and initiate the transfer */ glBindTexture(GL_TEXTURE_2D, texture->tex[t].t); glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image);