diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-22 15:33:16 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-02-22 15:35:07 +0300 |
commit | 947d78b00bd9bbc9992504c69f060f04c2e151de (patch) | |
tree | d752505c883abbce3dce6f3d6ded24f83a5514ab /source/blender | |
parent | 68aea23c27f2a95fbdbd226f383948438ebad293 (diff) |
Multires: Fix ownership problem causing crashes
Fixes crash when leaving multires mode.
Fixes T61836: Saving while in multires makes blender crash
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/modifiers/intern/MOD_multires.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_multires.c b/source/blender/modifiers/intern/MOD_multires.c index 0b3c9e1275d..aca16fe5ffe 100644 --- a/source/blender/modifiers/intern/MOD_multires.c +++ b/source/blender/modifiers/intern/MOD_multires.c @@ -168,6 +168,10 @@ static Mesh *applyModifier(ModifierData *md, /* NOTE: CCG takes ownership over Subdiv. */ result = multires_as_ccg(mmd, ctx, mesh, subdiv); result->runtime.subdiv_ccg_tot_level = mmd->totlvl; + /* NOTE: CCG becomes an owner of Subdiv descriptor, so can not share + * this pointer. Not sure if it's needed, but might have a second look + * on the ownership model here. */ + mmd->subdiv = NULL; // BKE_subdiv_stats_print(&subdiv->stats); } else { |