Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2013-06-20 15:00:35 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2013-06-20 15:00:35 +0400
commitb843bebb15a5d626e3367823f5071fff8518fcaf (patch)
treea48f0ed1ef440e5ccbb0c1adee5d2fac6127a389 /source
parente5944d23edd3efc88d1f60e4cee40eff8e21abfd (diff)
Fix crash in when dding subsurf modifier to curves
Issue was caused by svn rev57566 which didn't take into account the fact that curves could have dm of type CCGDM and in this case CDDM_calc_normals_mapping_ex would fail dramatically. Added a check around normals update call bout whether DM is CDDM or not. The same happens in mesh's modifier stack.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/displist.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c
index e1ecf00104a..38a0b848339 100644
--- a/source/blender/blenkernel/intern/displist.c
+++ b/source/blender/blenkernel/intern/displist.c
@@ -1040,7 +1040,9 @@ static void curve_calc_modifiers_post(Scene *scene, Object *ob, ListBase *dispba
DM_update_tessface_data(dm);
}
- CDDM_calc_normals_mapping_ex(dm, (dm->dirty & DM_DIRTY_NORMALS) ? false : true);
+ if (dm->type == DM_TYPE_CDDM) {
+ CDDM_calc_normals_mapping_ex(dm, (dm->dirty & DM_DIRTY_NORMALS) ? false : true);
+ }
}
(*derivedFinal) = dm;
}