Commit: bcdec635700b22e7d87756d8ea682e2d5c64032b
Author: Sergey Sharybin
Date:   Fri Jun 22 12:07:48 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBbcdec635700b22e7d87756d8ea682e2d5c64032b

Fix harmless use of unintialized memory

Still nbice to avoid such access to keep valgrind output more sane.

===================================================================

M       source/blender/blenkernel/intern/shrinkwrap.c

===================================================================

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;
                }
        }

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to