diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-15 11:37:42 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2012-05-15 11:37:42 +0400 |
commit | 8107130854c0ff6b4406c92e926fa51253ad39d1 (patch) | |
tree | 576ac80d1d922988324f5727a56d71161d80168e /source/blender/blenkernel/intern | |
parent | 9afb36b1e326a7fbaa3d18fbfefa26b4ab316a6e (diff) |
Fix bug #31460, crash in multires on leaving edit mode
Fix overly aggressive check for creating GridPaintMasks, wasn't
creating them in the right place after adding new faces in editmode.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 724d80afdd9..bd9972b62e6 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -1056,12 +1056,10 @@ static void multiresModifier_disp_run(DerivedMesh *dm, Mesh *me, DerivedMesh *dm dispgrid = mdisp->disps; /* if needed, reallocate multires paint mask */ - if (gpm && op == CALC_DISPLACEMENTS) { - if (gpm->level < key.level) { - gpm->level = key.level; - MEM_freeN(gpm->data); - gpm->data = MEM_callocN(sizeof(float) * key.grid_area, "gpm.data"); - } + if (gpm && gpm->level < key.level) { + gpm->level = key.level; + MEM_freeN(gpm->data); + gpm->data = MEM_callocN(sizeof(float) * key.grid_area, "gpm.data"); } for (y = 0; y < gridSize; y++) { |