Commit: 93dc2d373fdd34ca64dff53b9d830052fb2aa749
Author: Bastien Montagne
Date:   Wed Jan 30 12:00:58 2019 +0100
Branches: master
https://developer.blender.org/rB93dc2d373fdd34ca64dff53b9d830052fb2aa749

Fix (unreported) memleak when copying object and its material with GP settings.

Like... seriously?

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

M       source/blender/editors/object/object_add.c

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

diff --git a/source/blender/editors/object/object_add.c 
b/source/blender/editors/object/object_add.c
index 462059262dd..25391251948 100644
--- a/source/blender/editors/object/object_add.c
+++ b/source/blender/editors/object/object_add.c
@@ -2266,10 +2266,6 @@ static Base *object_add_duplicate_internal(Main *bmain, 
Scene *scene, ViewLayer
                                        ID_NEW_REMAP_US(obn->mat[a])
                                        else {
                                                obn->mat[a] = 
ID_NEW_SET(obn->mat[a], BKE_material_copy(bmain, obn->mat[a]));
-                                               /* duplicate grease pencil 
settings */
-                                               if (ob->mat[a]->gp_style) {
-                                                       obn->mat[a]->gp_style = 
MEM_dupallocN(ob->mat[a]->gp_style);
-                                               }
                                        }
                                        id_us_min(id);

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

Reply via email to