Revision: 29033
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29033
Author:   jwilkins
Date:     2010-05-27 22:31:32 +0200 (Thu, 27 May 2010)

Log Message:
-----------
Fixed crash bug with sculpt+multires introduced by optimizations

Modified Paths:
--------------
    branches/soc-2010-jwilkins/source/blender/blenlib/BLI_pbvh.h

Modified: branches/soc-2010-jwilkins/source/blender/blenlib/BLI_pbvh.h
===================================================================
--- branches/soc-2010-jwilkins/source/blender/blenlib/BLI_pbvh.h        
2010-05-27 20:18:56 UTC (rev 29032)
+++ branches/soc-2010-jwilkins/source/blender/blenlib/BLI_pbvh.h        
2010-05-27 20:31:32 UTC (rev 29033)
@@ -157,7 +157,7 @@
                struct MVert *verts; \
                int *grid_indices, totgrid, gridsize, *vert_indices, 
uniq_verts, totvert; \
                \
-               vi.grid = 0; /*memset(&vi, 0, sizeof(PBVHVertexIter));*/ \
+               vi.grid= 0; \
                \
                BLI_pbvh_node_get_grids(bvh, node, &grid_indices, &totgrid, 
NULL, &gridsize, &grids, NULL); \
                BLI_pbvh_node_num_verts(bvh, node, &uniq_verts, &totvert); \
@@ -199,14 +199,18 @@
                        \
                        for(vi.gx=0; vi.gx<vi.width; vi.gx++, vi.i++) { \
                                if(vi.grid) { \
-                                       vi.co= vi.grid->co; \
-                                       vi.fno= vi.grid->no; \
+                                        vi.mvert= 0; \
+                                       vi.co=    vi.grid->co; \
+                                        vi.no=    0; \
+                                       vi.fno=   vi.grid->no; \
+                                        \
                                        vi.grid++; \
                                } \
                                else { \
                                        vi.mvert= 
&vi.mverts[vi.vert_indices[vi.gx]]; \
-                                       vi.co= vi.mvert->co; \
-                                       vi.no= vi.mvert->no; \
+                                       vi.co=    vi.mvert->co; \
+                                       vi.no=    vi.mvert->no; \
+                                        vi.fno=   0; \
                                } \
 
 #define BLI_pbvh_vertex_iter_end \


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to