diff options
author | Dave Airlie <[email protected]> | 2016-05-09 16:13:45 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2016-05-10 06:06:09 +1000 |
commit | 2d41eb313fa354560e92e60336e5b0cdd40137f2 (patch) | |
tree | c1dd293a6c8e102ce8cc72af9cbf45b77f95c916 /src | |
parent | bbc6a275901b69ea2804f374cc03c2c2448d8e55 (diff) |
mesa/objectlabel: don't return info on genned but never bound textures.
This fixes some cases in the CTS KHR debug tests where it uses
glIsTexture to find an invalid ID and then call GetObjectLabel.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/objectlabel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c index 974abbcc6f5..1e3022ee547 100644 --- a/src/mesa/main/objectlabel.c +++ b/src/mesa/main/objectlabel.c @@ -196,7 +196,7 @@ get_label_pointer(struct gl_context *ctx, GLenum identifier, GLuint name, case GL_TEXTURE: { struct gl_texture_object *texObj = _mesa_lookup_texture(ctx, name); - if (texObj) + if (texObj && texObj->Target) labelPtr = &texObj->Label; } break; |