summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/objectlabel.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-05-09 16:13:45 +1000
committerDave Airlie <airlied@redhat.com>2016-05-10 06:06:09 +1000
commit2d41eb313fa354560e92e60336e5b0cdd40137f2 (patch)
treec1dd293a6c8e102ce8cc72af9cbf45b77f95c916 /src/mesa/main/objectlabel.c
parentbbc6a275901b69ea2804f374cc03c2c2448d8e55 (diff)
downloadexternal_mesa3d-2d41eb313fa354560e92e60336e5b0cdd40137f2.zip
external_mesa3d-2d41eb313fa354560e92e60336e5b0cdd40137f2.tar.gz
external_mesa3d-2d41eb313fa354560e92e60336e5b0cdd40137f2.tar.bz2
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 <ian.d.romanick@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/mesa/main/objectlabel.c')
-rw-r--r--src/mesa/main/objectlabel.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/main/objectlabel.c b/src/mesa/main/objectlabel.c
index 974abbc..1e3022e 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;