diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/texgetimage.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/mesa/main/texgetimage.c b/src/mesa/main/texgetimage.c index 0186819994e..d5cb1636605 100644 --- a/src/mesa/main/texgetimage.c +++ b/src/mesa/main/texgetimage.c @@ -1429,6 +1429,11 @@ _mesa_GetTextureImage(GLuint texture, GLint level, GLenum format, GLenum type, return; } + if (!legal_getteximage_target(ctx, texObj->Target, true)) { + _mesa_error(ctx, GL_INVALID_ENUM, "%s", caller); + return; + } + get_texture_image_dims(texObj, texObj->Target, level, &width, &height, &depth); |