summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2013-02-20 13:00:08 +0200
committerIan Romanick <ian.d.romanick@intel.com>2013-03-05 14:57:09 -0800
commitfa23151f43452b46bb5b5882ebcff00f36f59565 (patch)
treedf32d6e9b9bd5dfcd9c9d755302898e2eadc6d32
parentb1b2443ade55d8ba9c8f80f866afe9774b84d55d (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 <tapani.palli@intel.com> Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Chad Versace <chad.versace@linux.intel.com> (cherry picked from commit 3cdb548bfbc77522ed4e956f7457c8339182ff8c)
-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 d1723b88c49..62511735626 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);