mesa: Assert variable coming from get_variable() in get_current_attrib
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Thu, 19 Dec 2013 12:27:00 +0000 (05:27 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 19 Dec 2013 15:26:17 +0000 (08:26 -0700)
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/main/ff_fragment_shader.cpp

index 6e91697a1b134ba239912fc4c749f43e78c7f1c7..ba6258d89057bff83fa7fbc705c30c120b0a7d30 100644 (file)
@@ -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);