Fix error in last commit.

treedata could have a non-initialized tree in case of edge_snapping, leading to segfault.

Spotted by @mano-wii, thanks.
This commit is contained in:
Bastien Montagne 2016-02-05 18:48:15 +01:00
parent 3ad0344171
commit 2685d45fa2
1 changed files with 1 additions and 1 deletions

View File

@ -1539,7 +1539,7 @@ static bool snapDerivedMesh(
float ray_start_local[3], ray_normal_local[3];
float local_scale, local_depth, len_diff;
BVHTreeFromMesh treedata;
BVHTreeFromMesh treedata = {0};
invert_m4_m4(imat, obmat);
transpose_m3_m4(timat, imat);