projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe988d7
)
mesa: if maxLevels==0, target is invalid
author
Brian Paul
<brianp@vmware.com>
Thu, 13 Aug 2009 16:16:59 +0000
(10:16 -0600)
committer
Brian Paul
<brianp@vmware.com>
Thu, 13 Aug 2009 18:50:56 +0000
(12:50 -0600)
src/mesa/main/texgetimage.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texgetimage.c
b/src/mesa/main/texgetimage.c
index 2d3b82dd3874f003cfd2c8671cbf4543e0ae58e2..14d6fc76590c7ba3223793d389ebcf5da3f27402 100644
(file)
--- a/
src/mesa/main/texgetimage.c
+++ b/
src/mesa/main/texgetimage.c
@@
-373,7
+373,10
@@
getteximage_error_check(GLcontext *ctx, GLenum target, GLint level,
struct gl_texture_image *texImage;
const GLuint maxLevels = _mesa_max_texture_levels(ctx, target);
- ASSERT(maxLevels > 0); /* 0 indicates bad target, caught above */
+ if (maxLevels == 0) {
+ _mesa_error(ctx, GL_INVALID_ENUM, "glGetTexImage(target=0x%x)", target);
+ return GL_TRUE;
+ }
if (level < 0 || level >= maxLevels) {
_mesa_error( ctx, GL_INVALID_VALUE, "glGetTexImage(level)" );