diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-01-12 01:06:44 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2011-01-12 01:06:44 +0300 |
commit | 37b903e32c90562eeefcd1d3f93aa7f725a9729f (patch) | |
tree | 02888471a370f9471cb94df4e614752b454b5d8e /source | |
parent | 0a535feef6bd826774909e20be8c0828c9df1b83 (diff) |
Fix #25594: Adding mesh while in edit mode with multires - crash.
That primitives, which used ri crash blender, flips normals just after creation
and this normals flipping calls layers interpolation, but MDISPS layer
contains no data still.
Just added checking to layerInterp_mdisps.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenkernel/intern/customdata.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/customdata.c b/source/blender/blenkernel/intern/customdata.c index 134b0e10280..57f66a37343 100644 --- a/source/blender/blenkernel/intern/customdata.c +++ b/source/blender/blenkernel/intern/customdata.c @@ -445,6 +445,10 @@ static void layerInterp_mdisps(void **sources, float *UNUSED(weights), float (*sw)[4] = (void*)sub_weights; float (*disps)[3], (*out)[3]; + /* happens when flipping normals of newly created mesh */ + if(!d->totdisp) + return; + s = sources[0]; dst_corners = multires_mdisp_corners(d); src_corners = multires_mdisp_corners(s); |