mesa: test against MESA_FORMAT_NONE in _mesa_GetTexLevelParameteriv()

This commit is contained in:
Brian Paul
2011-07-28 09:43:09 -06:00
parent 58d6aa8287
commit 26684e0b1a
+1 -1
View File
@@ -888,7 +888,7 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
texObj = _mesa_select_tex_object(ctx, texUnit, target);
img = _mesa_select_tex_image(ctx, texObj, target, level);
if (!img || !img->TexFormat) {
if (!img || img->TexFormat == MESA_FORMAT_NONE) {
/* undefined texture image */
if (pname == GL_TEXTURE_COMPONENTS)
*params = 1;