[Mesa-dev] [PATCH 3/3] Mesa: add asserts in load_texunit_bumpmap

Juha-Pekka Heikkila juhapekka.heikkila at gmail.com
Wed Dec 18 05:58:32 PST 2013


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 at gmail.com>
---
 src/mesa/main/ff_fragment_shader.cpp | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/mesa/main/ff_fragment_shader.cpp b/src/mesa/main/ff_fragment_shader.cpp
index ad004ac..16715f6 100644
--- a/src/mesa/main/ff_fragment_shader.cpp
+++ b/src/mesa/main/ff_fragment_shader.cpp
@@ -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);
-- 
1.8.1.2



More information about the mesa-dev mailing list