From 1d0ddea92fc933d623caf1b9d3bda47b6f8296f8 Mon Sep 17 00:00:00 2001 From: Brian Date: Fri, 15 Feb 2008 13:41:39 -0700 Subject: Fix glBindTexture crash (bug 14514) --- src/mesa/main/texobj.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/texobj.c b/src/mesa/main/texobj.c index 3e017c1eda1..24d8110b002 100644 --- a/src/mesa/main/texobj.c +++ b/src/mesa/main/texobj.c @@ -861,7 +861,8 @@ _mesa_BindTexture( GLenum target, GLuint texName ) newTexObj = ctx->Shared->Default2DArray; break; default: - ; /* Bad targets are caught above */ + _mesa_error(ctx, GL_INVALID_ENUM, "glBindTexture(target)"); + return; } } else { @@ -939,6 +940,7 @@ _mesa_BindTexture( GLenum target, GLuint texName ) texUnit->Current2DArray = newTexObj; break; default: + /* Bad target should be caught above */ _mesa_problem(ctx, "bad target in BindTexture"); return; } -- cgit v1.2.3