[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54827] trunk/blender/source/blender/ blenkernel/intern/pbvh_bmesh.c: Fix for collapse-edges crash in dyntopo

Nicholas Bishop nicholasbishop at gmail.com
Mon Feb 25 01:02:27 CET 2013


Revision: 54827
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54827
Author:   nicholasbishop
Date:     2013-02-25 00:02:25 +0000 (Mon, 25 Feb 2013)
Log Message:
-----------
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

Modified Paths:
--------------
    trunk/blender/source/blender/blenkernel/intern/pbvh_bmesh.c

Modified: trunk/blender/source/blender/blenkernel/intern/pbvh_bmesh.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/pbvh_bmesh.c	2013-02-24 23:43:40 UTC (rev 54826)
+++ trunk/blender/source/blender/blenkernel/intern/pbvh_bmesh.c	2013-02-25 00:02:25 UTC (rev 54827)
@@ -412,7 +412,7 @@
 	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;
 




More information about the Bf-blender-cvs mailing list