From 22bf0f3eb4668044042cdf326ccee29fa44f850a Mon Sep 17 00:00:00 2001 From: Juha-Pekka Heikkila Date: Thu, 19 Dec 2013 05:27:00 -0700 Subject: [PATCH] mesa: Assert variable coming from get_variable() in get_current_attrib Signed-off-by: Juha-Pekka Heikkila Reviewed-by: Brian Paul --- src/mesa/main/ff_fragment_shader.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp index 6e91697a1b1..ba6258d8905 100644 --- a/src/mesa/main/ff_fragment_shader.cpp +++ b/src/mesa/main/ff_fragment_shader.cpp @@ -543,6 +543,7 @@ get_current_attrib(texenv_fragment_program *p, GLuint attrib) ir_rvalue *val; current = p->shader->symbols->get_variable("gl_CurrentAttribFragMESA"); + assert(current); current->data.max_array_access = MAX2(current->data.max_array_access, attrib); val = new(p->mem_ctx) ir_dereference_variable(current); ir_rvalue *index = new(p->mem_ctx) ir_constant(attrib); -- 2.30.2