Fix (unreported) bug in BVHTree 'free tessfaces' flag setting.
authorBastien Montagne <montagne29@wanadoo.fr>
Wed, 9 May 2018 10:33:21 +0000 (12:33 +0200)
committerBastien Montagne <montagne29@wanadoo.fr>
Wed, 9 May 2018 10:33:21 +0000 (12:33 +0200)
Could lead to atempt to free NULL pointer, and/or memory leak.

source/blender/blenkernel/intern/bvhutils.c

index 0240bb4b62415ed4be3b3b22cf45d61208fa3faf..3c0f38939feac942ad45d0560bb28760e297e783 100644 (file)
@@ -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;