Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 13:07:48 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-06-22 13:08:18 +0300
commitbcdec635700b22e7d87756d8ea682e2d5c64032b (patch)
tree6c31581cde73a3f7afa10a96dad57d257e1b7e3d /source/blender/blenkernel/intern/shrinkwrap.c
parente6e2e9c246fb1d8533b8f269dd8b85b6f0be3cf5 (diff)
Fix harmless use of unintialized memory
Still nbice to avoid such access to keep valgrind output more sane.
Diffstat (limited to 'source/blender/blenkernel/intern/shrinkwrap.c')
-rw-r--r--source/blender/blenkernel/intern/shrinkwrap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/shrinkwrap.c b/source/blender/blenkernel/intern/shrinkwrap.c
index c93e964c5ee..3db03c3f085 100644
--- a/source/blender/blenkernel/intern/shrinkwrap.c
+++ b/source/blender/blenkernel/intern/shrinkwrap.c
@@ -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;
}
}