From: Erik Faye-Lund Date: Sun, 12 Aug 2018 13:24:38 +0000 (+0200) Subject: mesa/st/glsl_to_tgsi: fixup copy-paste mistake X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae5770171ccfb085a57c3ef9251c16484c47b6af;p=mesa.git mesa/st/glsl_to_tgsi: fixup copy-paste mistake This is clearly a copy-paste error; if we validate the reladdr2-pointer, we don't want to traverse to the reladdr-pointer. Especially since the check above shows that reladdr could be NULL here. Noticed by Coverity. CID: 1438389, 1438390 Fixes: 568bda2f2d3 ("mesa/st/glsl_to_tgsi: Split arrays whose elements are only accessed directly") Signed-off-by: Erik Faye-Lund Reviewed-by: Gert Wollny --- diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index a2083a4f856..2b9183abbb8 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -5493,7 +5493,7 @@ void test_indirect_access(const st_reg& reg, bool *has_indirect_access) if (reg.reladdr) test_indirect_access(*reg.reladdr, has_indirect_access); if (reg.reladdr2) - test_indirect_access(*reg.reladdr, has_indirect_access); + test_indirect_access(*reg.reladdr2, has_indirect_access); } } }