From: Tapani Pälli Date: Wed, 20 Feb 2013 11:00:08 +0000 (+0200) Subject: mesa/es: NULL check in EGLImageTargetTexture2DOES X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3cdb548bfbc77522ed4e956f7457c8339182ff8c;p=mesa.git mesa/es: NULL check in EGLImageTargetTexture2DOES check that pointer passed is valid and return error if not. Note: This is a candidate for the stable branches. Signed-off-by: Tapani Pälli Reviewed-by: Ian Romanick Reviewed-by: Chad Versace --- diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index f8f517a427b..f0de0fb4935 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3187,6 +3187,12 @@ _mesa_EGLImageTargetTexture2DOES (GLenum target, GLeglImageOES image) return; } + if (!image) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glEGLImageTargetTexture2D(image=%p)", image); + return; + } + if (ctx->NewState & _NEW_PIXEL) _mesa_update_state(ctx);