Commit: c23526ac73f4c592417d181c8d7cfbf23967a156
Author: Antonio Vazquez
Date: Tue Aug 15 12:16:07 2017 +0200
Branches: greasepencil-object
https://developer.blender.org/rBc23526ac73f4c592417d181c8d7cfbf23967a156
Fix segment fault when draw polygons
===================================================================
M source/blender/editors/gpencil/gpencil_paint.c
===================================================================
diff --git a/source/blender/editors/gpencil/gpencil_paint.c
b/source/blender/editors/gpencil/gpencil_paint.c
index 45d5707f127..e49122bf922 100644
--- a/source/blender/editors/gpencil/gpencil_paint.c
+++ b/source/blender/editors/gpencil/gpencil_paint.c
@@ -609,7 +609,9 @@ static short gp_stroke_addpoint(const bContext *C, tGPsdata
*p, const int mval[2
}
pts = &gps->points[gps->totpoints - 1];
-
+ pts->totweight = 0;
+ pts->weights = NULL;
+
/* special case for poly lines: normally,
* depth is needed only when creating new stroke from
buffer,
* but poly lines are converting to stroke instantly,
@@ -635,6 +637,9 @@ static short gp_stroke_addpoint(const bContext *C, tGPsdata
*p, const int mval[2
pts->pressure = pt->pressure;
pts->strength = pt->strength;
pts->time = pt->time;
+ pts->totweight = 0;
+ pts->weights = NULL;
+
/* force fill recalc */
gps->flag |= GP_STROKE_RECALC_CACHES;
/* drawing batch cache is dirty now */
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs