From: Brian Date: Fri, 15 Feb 2008 20:41:39 +0000 (-0700) Subject: Fix glBindTexture crash (bug 14514) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1d0ddea92fc933d623caf1b9d3bda47b6f8296f8;p=mesa.git Fix glBindTexture crash (bug 14514) --- 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; }