check that pointer passed is valid and return error if not.
Signed-off-by: Tapani Pälli <[email protected]>
---
src/mesa/main/teximage.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c
index f8f517a..f0de0fb 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);
--
1.8.1.2
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev