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 <tapani.palli@intel.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Chad Versace <chad.versace@linux.intel.com>
This commit is contained in:
Tapani Pälli 2013-02-20 13:00:08 +02:00 committed by Chad Versace
parent 331967c773
commit 3cdb548bfb
1 changed files with 6 additions and 0 deletions

View File

@ -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);