From 2d41eb313fa354560e92e60336e5b0cdd40137f2 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Mon, 9 May 2016 16:13:45 +1000 Subject: [PATCH] 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 Reviewed-by: Kenneth Graunke Signed-off-by: Dave Airlie --- src/mesa/main/objectlabel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.30.2