Commit: e46e8eafb782bd5892e371379eeb520d3eb4ad15
Author: Lukas Tönne
Date:   Thu May 24 17:27:58 2018 +0100
Branches: hair_guides_grooming
https://developer.blender.org/rBe46e8eafb782bd5892e371379eeb520d3eb4ad15

Add missing copy and free for scalp region data.

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

M       source/blender/blenkernel/intern/groom.c
M       source/blender/editors/groom/editgroom.c

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

diff --git a/source/blender/blenkernel/intern/groom.c 
b/source/blender/blenkernel/intern/groom.c
index ad7d1115fca..27131adfeed 100644
--- a/source/blender/blenkernel/intern/groom.c
+++ b/source/blender/blenkernel/intern/groom.c
@@ -113,6 +113,10 @@ static void groom_bundles_free(ListBase *bundles)
                {
                        MEM_freeN(bundle->verts);
                }
+               if (bundle->scalp_region)
+               {
+                       MEM_freeN(bundle->scalp_region);
+               }
        }
        BLI_freelistN(bundles);
 }
@@ -175,6 +179,10 @@ void BKE_groom_copy_data(Main *UNUSED(bmain), Groom 
*groom_dst, const Groom *gro
                {
                        bundle->verts = MEM_dupallocN(bundle->verts);
                }
+               if (bundle->scalp_region)
+               {
+                       bundle->scalp_region = 
MEM_dupallocN(bundle->scalp_region);
+               }
        }
        
        groom_dst->editgroom = NULL;
diff --git a/source/blender/editors/groom/editgroom.c 
b/source/blender/editors/groom/editgroom.c
index 47f5d40c09b..01c7a480949 100644
--- a/source/blender/editors/groom/editgroom.c
+++ b/source/blender/editors/groom/editgroom.c
@@ -82,6 +82,10 @@ static void groom_bundles_free(ListBase *bundles)
                {
                        MEM_freeN(bundle->sections);
                }
+               if (bundle->scalp_region)
+               {
+                       MEM_freeN(bundle->scalp_region);
+               }
        }
        BLI_freelistN(bundles);
 }
@@ -103,6 +107,10 @@ static void groom_bundles_copy(ListBase *bundles_dst, 
ListBase *bundles_src)
                {
                        bundle->verts = MEM_dupallocN(bundle->verts);
                }
+               if (bundle->scalp_region)
+               {
+                       bundle->scalp_region = 
MEM_dupallocN(bundle->scalp_region);
+               }
        }
 }

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

Reply via email to