diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-20 15:00:35 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2013-06-20 15:00:35 +0400 |
commit | b843bebb15a5d626e3367823f5071fff8518fcaf (patch) | |
tree | a48f0ed1ef440e5ccbb0c1adee5d2fac6127a389 | |
parent | e5944d23edd3efc88d1f60e4cee40eff8e21abfd (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.
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 4 |
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; } |