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 <erik.faye-lund@collabora.com>
Reviewed-by: Gert Wollny <gw.fossdev@gmail.com>
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);
}
}
}