From 982c4c87f7d5d5c3f2a9fea4fb5b2170d25c1968 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 12 Aug 2010 10:35:34 +0000 Subject: Fix #23281: crash with multiresolution and uv project. --- source/blender/blenkernel/intern/subsurf_ccg.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/subsurf_ccg.c b/source/blender/blenkernel/intern/subsurf_ccg.c index 0d7738353df..4c85656dd91 100644 --- a/source/blender/blenkernel/intern/subsurf_ccg.c +++ b/source/blender/blenkernel/intern/subsurf_ccg.c @@ -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; -- cgit v1.2.3