From: Brian Paul Date: Thu, 4 Aug 2011 14:22:31 +0000 (-0600) Subject: mesa: add null ptr checks in GetTexParameterI[u]iv() functions X-Git-Tag: 062012170305~4896^2~374 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=02d81dfcaf073b5f7073d405e931b3d3e9f577ef;p=profile%2Fivi%2Fmesa.git mesa: add null ptr checks in GetTexParameterI[u]iv() functions --- diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index 0dec017..97d0359 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -1379,6 +1379,8 @@ _mesa_GetTexParameterIiv(GLenum target, GLenum pname, GLint *params) ASSERT_OUTSIDE_BEGIN_END(ctx); texObj = get_texobj(ctx, target, GL_TRUE); + if (!texObj) + return; switch (pname) { case GL_TEXTURE_BORDER_COLOR: @@ -1399,6 +1401,8 @@ _mesa_GetTexParameterIuiv(GLenum target, GLenum pname, GLuint *params) ASSERT_OUTSIDE_BEGIN_END(ctx); texObj = get_texobj(ctx, target, GL_TRUE); + if (!texObj) + return; switch (pname) { case GL_TEXTURE_BORDER_COLOR: