Fix #23281: crash with multiresolution and uv project.
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 12 Aug 2010 10:35:34 +0000 (10:35 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Thu, 12 Aug 2010 10:35:34 +0000 (10:35 +0000)
source/blender/blenkernel/intern/subsurf_ccg.c

index 0d7738353df55a31fd17a10c3faa968b7cc9854a..4c85656dd914d4187b9ef4ac2c920ab30a1c94ca 100644 (file)
@@ -69,6 +69,8 @@ static int ccgDM_getVertMapIndex(CCGSubSurf *ss, CCGVert *v);
 static int ccgDM_getEdgeMapIndex(CCGSubSurf *ss, CCGEdge *e);
 static int ccgDM_getFaceMapIndex(CCGSubSurf *ss, CCGFace *f);
 
+static int ccgDM_use_grid_pbvh(CCGDerivedMesh *ccgdm);
+
 ///
 
 static void *arena_alloc(CCGAllocatorHDL a, int numBytes) {
@@ -1249,7 +1251,7 @@ static void ccgDM_glNormalFast(float *a, float *b, float *c, float *d)
 
 static void ccgdm_pbvh_update(CCGDerivedMesh *ccgdm)
 {
-       if(ccgdm->pbvh && ccgdm->multires.mmd) {
+       if(ccgdm->pbvh && ccgDM_use_grid_pbvh(ccgdm)) {
                CCGFace **faces;
                int totface;