Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 14:36:22 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2010-02-01 14:36:22 +0300
commitc5ef38a415805d4d4609eb44a85cc0417b2fa7d5 (patch)
treeaf1a25daa88616cb9df87f2b88da2289f0acf6a4 /source/blender/blenlib
parent7795e71377a6f21713eec5c579a52d2fd499e733 (diff)
Fix #20420: grab brush + subsurf modifier crash. Previously the PBVH nodes
were cached once at the start, but these can change when modifiers are executed, now it simply doesn't cache them anymore, that was only really a performance bottleneck when it was caching individual vertices.
Diffstat (limited to 'source/blender/blenlib')
-rw-r--r--source/blender/blenlib/intern/pbvh.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenlib/intern/pbvh.c b/source/blender/blenlib/intern/pbvh.c
index 0133017eb4d..9bc04201419 100644
--- a/source/blender/blenlib/intern/pbvh.c
+++ b/source/blender/blenlib/intern/pbvh.c
@@ -346,6 +346,8 @@ static void build_mesh_leaf_node(PBVH *bvh, PBVHNode *node)
GET_INT_FROM_POINTER(BLI_ghashIterator_getKey(iter));
}
+ BLI_ghashIterator_free(iter);
+
for(i = 0; i < totface*4; ++i)
if(node->face_vert_indices[i] < 0)
node->face_vert_indices[i]= -node->face_vert_indices[i] + node->uniq_verts - 1;
@@ -1006,6 +1008,8 @@ void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *tot
BLI_ghashIterator_step(hiter), ++i)
faces[i]= BLI_ghashIterator_getKey(hiter);
+ BLI_ghashIterator_free(hiter);
+
BLI_ghash_free(map, NULL, NULL);
*totface= tot;