From 64a2f9806238464895c726af9a96760377b3ebb6 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Tue, 19 Jun 2018 10:43:54 +0200 Subject: Fix (unreported) unauthorized relesing of derived_final DM in paint projection code. NEVER free yourself DM returned by mesh_get_derived_final(), it's always to one assigned to ob->derived_final! --- source/blender/editors/sculpt_paint/paint_image_proj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c index 9843629b706..6a37b3df47f 100644 --- a/source/blender/editors/sculpt_paint/paint_image_proj.c +++ b/source/blender/editors/sculpt_paint/paint_image_proj.c @@ -3442,7 +3442,7 @@ static bool proj_paint_state_dm_init(ProjPaintState *ps) ps->dm = mesh_get_derived_final( ps->scene, ps->ob, ps->scene->customdata_mask | CD_MASK_MTFACE | (ps->do_face_sel ? CD_ORIGINDEX : 0)); - ps->dm_release = true; + ps->dm_release = false; } if (!CustomData_has_layer(&ps->dm->loopData, CD_MLOOPUV)) { -- cgit v1.2.3