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.
This commit is contained in:
Sergey Sharybin 2011-01-11 22:06:44 +00:00
parent 0a535feef6
commit 37b903e32c

@ -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);