Fix potential invalid memory access in surface force field BVH tree.
authorAndrew Williams <sobakasu>
Tue, 22 Jan 2019 11:51:14 +0000 (12:51 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Tue, 22 Jan 2019 14:24:06 +0000 (15:24 +0100)
commit102631486b480d98c2d9b921a95472688bba8416
tree56e6db8ef761ec3ce19a395c14eb30b518fabafb
parent414ebc68c2cccabc20eb9b966c8235d222874d56
Fix potential invalid memory access in surface force field BVH tree.

Free the BVH tree immediately along with the mesh, otherwise we might access
invalid mesh data.

Differential Revision: https://developer.blender.org/D4201
source/blender/blenkernel/intern/bvhutils.c
source/blender/blenlib/intern/BLI_kdopbvh.c
source/blender/modifiers/intern/MOD_surface.c