summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2011-08-04 08:22:31 -0600
committerBrian Paul <[email protected]>2011-08-04 08:22:31 -0600
commit02d81dfcaf073b5f7073d405e931b3d3e9f577ef (patch)
treedb2daae1cf8a67dd68e23dac01158559554bbd7d /src/mesa/main
parent1254a2b2e45c6961a57d9c60f561907183ef7de7 (diff)
mesa: add null ptr checks in GetTexParameterI[u]iv() functions
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/texparam.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c
index 0dec0172989..97d0359f170 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: