aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main/objectlabel.c
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2016-05-09 16:13:45 +1000
committerDave Airlie <[email protected]>2016-05-10 06:06:09 +1000
commit2d41eb313fa354560e92e60336e5b0cdd40137f2 (patch)
treec1dd293a6c8e102ce8cc72af9cbf45b77f95c916 /src/mesa/main/objectlabel.c
parentbbc6a275901b69ea2804f374cc03c2c2448d8e55 (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/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 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;