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:
authorNicholas Bishop <nicholasbishop@gmail.com>2013-02-25 04:02:25 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2013-02-25 04:02:25 +0400
commit07beb61b1e6a11028a86c3dd95497a505d842605 (patch)
tree3d3ae8210f0d4385f5d754a1868c1b0cecdef489 /source/blender/blenkernel/intern/pbvh_bmesh.c
parent4e1ea1f9fd84fa37513165689fdc3edbb11f0856 (diff)
Fix for collapse-edges crash in dyntopo
Was incorrectly testing for a vertex in a set with BLI_ghash_lookup rather than BLI_ghash_haskey; the key in this case is always null so the test failed. This could leave the PBVH in an inconsistent state, since the top-level map of BMesh vertices to PBVH nodes would indicate the vertex was in a node, but that node wouldn't actually have any faces using the vertex. That inconsistent state would eventually lead to a crash in pbvh_bmesh_vert_remove(). Fixes http://projects.blender.org/tracker/?func=detail&atid=498&aid=34370&group_id=9
Diffstat (limited to 'source/blender/blenkernel/intern/pbvh_bmesh.c')
-rw-r--r--source/blender/blenkernel/intern/pbvh_bmesh.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/pbvh_bmesh.c b/source/blender/blenkernel/intern/pbvh_bmesh.c
index 666c85d2f6b..e46e95617ed 100644
--- a/source/blender/blenkernel/intern/pbvh_bmesh.c
+++ b/source/blender/blenkernel/intern/pbvh_bmesh.c
@@ -412,7 +412,7 @@ static void pbvh_bmesh_face_remove(PBVH *bvh, BMFace *f)
do {
v = l_iter->v;
if (pbvh_bmesh_node_vert_use_count(bvh, f_node, v) == 1) {
- if (BLI_ghash_lookup(f_node->bm_unique_verts, v)) {
+ if (BLI_ghash_haskey(f_node->bm_unique_verts, v)) {
/* Find a different node that uses 'v' */
PBVHNode *new_node;