From 26684e0b1a857cc16a2c6f2b542e5ccf3da5acf5 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Thu, 28 Jul 2011 09:43:09 -0600 Subject: [PATCH] mesa: test against MESA_FORMAT_NONE in _mesa_GetTexLevelParameteriv() --- src/mesa/main/texparam.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mesa/main/texparam.c b/src/mesa/main/texparam.c index c4ec29533e2..3f771f08bc6 100644 --- a/src/mesa/main/texparam.c +++ b/src/mesa/main/texparam.c @@ -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; -- 2.30.2