summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/main/get.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 976bff6653e..4855187aa6f 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -994,16 +994,7 @@ find_custom_value(struct gl_context *ctx, const struct value_desc *d, union valu
{
struct gl_sampler_object *samp =
ctx->Texture.Unit[ctx->Texture.CurrentUnit].Sampler;
-
- /*
- * The sampler object may have been deleted on another context,
- * so we try to lookup the sampler object before returning its Name.
- */
- if (samp && _mesa_lookup_samplerobj(ctx, samp->Name)) {
- v->value_int = samp->Name;
- } else {
- v->value_int = 0;
- }
+ v->value_int = samp ? samp->Name : 0;
}
break;
/* GL_ARB_uniform_buffer_object */