Commit: 64a2f9806238464895c726af9a96760377b3ebb6
Author: Bastien Montagne
Date:   Tue Jun 19 10:43:54 2018 +0200
Branches: master
https://developer.blender.org/rB64a2f9806238464895c726af9a96760377b3ebb6

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!

===================================================================

M       source/blender/editors/sculpt_paint/paint_image_proj.c

===================================================================

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)) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to