[Bf-blender-cvs] [c8071080e9f] greasepencil-object: Redo previous commit for Join
Antonio Vazquez
noreply at git.blender.org
Tue Oct 17 16:20:44 CEST 2017
Commit: c8071080e9f14465e6583d0c734a1be171a45251
Author: Antonio Vazquez
Date: Tue Oct 17 16:19:48 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBc8071080e9f14465e6583d0c734a1be171a45251
Redo previous commit for Join
If the weight memory is not duplicated, when the initial stroke is released the memory can get corrupted.
===================================================================
M source/blender/editors/gpencil/gpencil_edit.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c
index 1c7fd819f2d..2e9154071e9 100644
--- a/source/blender/editors/gpencil/gpencil_edit.c
+++ b/source/blender/editors/gpencil/gpencil_edit.c
@@ -2353,7 +2353,7 @@ static void gpencil_stroke_copy_point(bGPDstroke *gps, bGPDspoint *point, float
newpoint->strength = strength;
newpoint->time = point->time + deltatime;
newpoint->totweight = point->totweight;
- newpoint->weights = point->weights;
+ newpoint->weights = MEM_dupallocN(point->weights);
}
/* Helper: join two strokes using the shortest distance (reorder stroke if necessary ) */
More information about the Bf-blender-cvs
mailing list