mesa: add asserts in load_texunit_bumpmap
authorJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Wed, 18 Dec 2013 13:58:00 +0000 (06:58 -0700)
committerBrian Paul <brianp@vmware.com>
Wed, 18 Dec 2013 16:40:29 +0000 (09:40 -0700)
In load_texunit_bumpmap tc_array is asserted so lets assert
rot_mat_0 and rot_mat_1 also which are coming from same path.

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 ad004acb6170a1b73d4836c5a6a586b91b2df718..16715f635cb5d2182306a2aba8490289a4e7e08e 100644 (file)
@@ -1096,7 +1096,9 @@ load_texunit_bumpmap( texenv_fragment_program *p, GLuint unit )
    ir_variable *rot_mat_0, *rot_mat_1;
 
    rot_mat_0 = p->shader->symbols->get_variable("gl_BumpRotMatrix0MESA");
+   assert(rot_mat_0);
    rot_mat_1 = p->shader->symbols->get_variable("gl_BumpRotMatrix1MESA");
+   assert(rot_mat_1);
 
    ir_variable *tc_array = p->shader->symbols->get_variable("gl_TexCoord");
    assert(tc_array);