From 95c7095e138ed566c8d14d2ea5f41dbb109b6d5b Mon Sep 17 00:00:00 2001 From: Emre Ucan Date: Tue, 20 Mar 2018 15:29:39 +0100 Subject: [PATCH] gl-renderer: set num_images after import_simple_dmabuf we have to set num_images after import_simple_dmabuf call. Otherwise, egl_images will not be correctly referenced in gl_renderer_attach_dmabuf. (Found by clang source code analyzer) Signed-off-by: Emre Ucan Reviewed-by: Pekka Paalanen --- libweston/gl-renderer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libweston/gl-renderer.c b/libweston/gl-renderer.c index a6b29a92..2c50d2da 100644 --- a/libweston/gl-renderer.c +++ b/libweston/gl-renderer.c @@ -2216,6 +2216,7 @@ import_known_dmabuf(struct gl_renderer *gr, image->images[0] = import_simple_dmabuf(gr, &image->dmabuf->attributes); if (!image->images[0]) return false; + image->num_images = 1; break; case IMPORT_TYPE_GL_CONVERSION: