summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/teximage.c
diff options
context:
space:
mode:
authorTapani Pälli <[email protected]>2013-02-20 13:00:08 +0200
committerChad Versace <[email protected]>2013-02-25 09:17:31 -0800
commit3cdb548bfbc77522ed4e956f7457c8339182ff8c (patch)
treeacd135d37e36491bc1130bdbfd050a878bebabac /src/mesa/main/teximage.c
parent331967c7733c1146bd6b3a11908d9fdd6b213d72 (diff)
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 <[email protected]> Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Chad Versace <[email protected]>
Diffstat (limited to 'src/mesa/main/teximage.c')
-rw-r--r--src/mesa/main/teximage.c6
1 files changed, 6 insertions, 0 deletions
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);