fix [#27271] Going into sculpt mode causes crash

This commit is contained in:
Campbell Barton
2011-05-03 15:01:55 +00:00
parent 12a78aceee
commit 23f1f26e7b

View File

@@ -1815,7 +1815,7 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
* to avoid giving bogus normals to the next modifier see: [#23673] */ * to avoid giving bogus normals to the next modifier see: [#23673] */
if(isPrevDeform && mti->dependsOnNormals && mti->dependsOnNormals(md)) { if(isPrevDeform && mti->dependsOnNormals && mti->dependsOnNormals(md)) {
/* XXX, this covers bug #23673, but we may need normal calc for other types */ /* XXX, this covers bug #23673, but we may need normal calc for other types */
if(dm->type == DM_TYPE_CDDM) { if(dm && dm->type == DM_TYPE_CDDM) {
CDDM_apply_vert_coords(dm, deformedVerts); CDDM_apply_vert_coords(dm, deformedVerts);
CDDM_calc_normals(dm); CDDM_calc_normals(dm);
} }