From: Dave Airlie Date: Mon, 9 May 2016 06:13:45 +0000 (+1000) Subject: mesa/objectlabel: don't return info on genned but never bound textures. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2d41eb313fa354560e92e60336e5b0cdd40137f2;p=mesa.git 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 --- 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;