summaryrefslogtreecommitdiff
path: root/src/mesa
diff options
context:
space:
mode:
authorBrian <brian.paul@tungstengraphics.com>2008-02-15 13:41:21 -0700
committerBrian <brian.paul@tungstengraphics.com>2008-02-15 13:42:19 -0700
commitbf97ca448cce48e63e9edcc25ada18ce47cdd11e (patch)
tree6aeddefa9e6f5103c5285a8eacdd15d154e8b5de /src/mesa
parentc5f8ff8b32795a0d7d31bec301eeadc2b9339bfa (diff)
Fix glBindTexture crash (bug 14514)
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/texobj.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c
index 7b36154a5e5..f385f8112cf 100644
--- a/src/mesa/main/texobj.c
+++ b/src/mesa/main/texobj.c
@@ -854,7 +854,8 @@ _mesa_BindTexture( GLenum target, GLuint texName )
newTexObj = ctx->Shared->DefaultRect;
break;
default:
- ; /* Bad targets are caught above */
+ _mesa_error(ctx, GL_INVALID_ENUM, "glBindTexture(target)");
+ return;
}
}
else {
@@ -926,6 +927,7 @@ _mesa_BindTexture( GLenum target, GLuint texName )
_mesa_reference_texobj(&texUnit->CurrentRect, newTexObj);
break;
default:
+ /* Bad target should be caught above */
_mesa_problem(ctx, "bad target in BindTexture");
return;
}