[Mesa-dev] [PATCH] meta: Check after null return value at blitframebuffer_texture()

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Sun Jan 31 10:39:26 PST 2016


Look after _mesa_meta_setup_sampler() return value.

Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 src/mesa/drivers/common/meta_blit.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/drivers/common/meta_blit.c b/src/mesa/drivers/common/meta_blit.c
index 5d80f7d..7e4c6cb 100644
--- a/src/mesa/drivers/common/meta_blit.c
+++ b/src/mesa/drivers/common/meta_blit.c
@@ -705,6 +705,8 @@ blitframebuffer_texture(struct gl_context *ctx,
 
    fb_tex_blit.samp_obj = _mesa_meta_setup_sampler(ctx, texObj, target, filter,
                                                    srcLevel);
+   if (!fb_tex_blit.samp_obj)
+      return false;
 
    /* Always do our blits with no net sRGB decode or encode.
     *
-- 
1.9.1



More information about the mesa-dev mailing list