summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/texstate.c
diff options
context:
space:
mode:
authorBrian Paul <[email protected]>2001-03-30 21:14:30 +0000
committerBrian Paul <[email protected]>2001-03-30 21:14:30 +0000
commit67f755423248e044a94a02a3e9e6856018610909 (patch)
tree6634576a1cb62d43b0d43c6bebdc7f78aac8a6f3 /src/mesa/main/texstate.c
parent347b3f0dafe8d0cc30e9d1e7595d12b0ac31bb4a (diff)
querying proxy texture image info was segfaulting because of NULL TexFormat pointer
Diffstat (limited to 'src/mesa/main/texstate.c')
-rw-r--r--src/mesa/main/texstate.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mesa/main/texstate.c b/src/mesa/main/texstate.c
index 398e23d0a89..c5123ef7907 100644
--- a/src/mesa/main/texstate.c
+++ b/src/mesa/main/texstate.c
@@ -1,4 +1,4 @@
-/* $Id: texstate.c,v 1.41 2001/03/28 21:36:31 gareth Exp $ */
+/* $Id: texstate.c,v 1.42 2001/03/30 21:14:30 brianp Exp $ */
/*
* Mesa 3-D graphics library
@@ -933,7 +933,8 @@ _mesa_GetTexLevelParameteriv( GLenum target, GLint level,
}
img = _mesa_select_tex_image(ctx, texUnit, target, level);
- if (!img) {
+ if (!img || !img->TexFormat) {
+ /* undefined texture image */
if (pname == GL_TEXTURE_COMPONENTS)
*params = 1;
else