Fix harmless use of unintialized memory

Still nbice to avoid such access to keep valgrind output more sane.
This commit is contained in:
Sergey Sharybin 2018-06-22 12:07:48 +02:00
parent e6e2e9c246
commit bcdec63570
1 changed files with 1 additions and 1 deletions

View File

@ -357,7 +357,7 @@ static void shrinkwrap_calc_normal_projection_cb_ex(
/* don't set the initial dist (which is more efficient),
* because its calculated in the targets space, we want the dist in our own space */
if (proj_limit_squared != 0.0f) {
if (len_squared_v3v3(hit->co, co) > proj_limit_squared) {
if (hit->index != -1 && len_squared_v3v3(hit->co, co) > proj_limit_squared) {
hit->index = -1;
}
}