[Bf-blender-cvs] [f3efa9e15f5] master: Fix (unreported) bug in BVHTree 'free tessfaces' flag setting.

Bastien Montagne noreply at git.blender.org
Wed May 9 12:34:47 CEST 2018


Commit: f3efa9e15f58d98087796feb263680deb5cd7047
Author: Bastien Montagne
Date:   Wed May 9 12:33:21 2018 +0200
Branches: master
https://developer.blender.org/rBf3efa9e15f58d98087796feb263680deb5cd7047

Fix (unreported) bug in BVHTree 'free tessfaces' flag setting.

Could lead to atempt to free NULL pointer, and/or memory leak.

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

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

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

diff --git a/source/blender/blenkernel/intern/bvhutils.c b/source/blender/blenkernel/intern/bvhutils.c
index 0240bb4b624..3c0f38939fe 100644
--- a/source/blender/blenkernel/intern/bvhutils.c
+++ b/source/blender/blenkernel/intern/bvhutils.c
@@ -1132,7 +1132,7 @@ BVHTree *bvhtree_from_mesh_get(
 		data->looptri = looptri;
 		data->vert_allocated = vert_allocated;
 		data->edge_allocated = edge_allocated;
-		data->edge_allocated = edge_allocated;
+		data->face_allocated = face_allocated;
 		data->loop_allocated = loop_allocated;
 		data->looptri_allocated = looptri_allocated;



More information about the Bf-blender-cvs mailing list