[Mesa-dev] [PATCH 3/3] Mesa: Assert variable coming from get_variable() in get_current_attrib

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Thu Dec 19 04:27:14 PST 2013


Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila at gmail.com>
---
 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 6e91697..ba6258d 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);
-- 
1.8.1.2



More information about the mesa-dev mailing list