Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2018-05-18 15:23:53 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-05-18 15:23:53 +0300
commit1cc4ab481e87c0e3f459302bffbdf029545fd42d (patch)
treed3058f7d87f339e113f5366393a13cd5d5031a3b /source
parentcb50c288d40155684c57eb6bfe5a1730edd190e7 (diff)
Fix crash drawing polygon curves
Diffstat (limited to 'source')
-rw-r--r--source/blender/editors/curve/editcurve_paint.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/editors/curve/editcurve_paint.c b/source/blender/editors/curve/editcurve_paint.c
index 0d7cb089c4f..36d9f8a4c55 100644
--- a/source/blender/editors/curve/editcurve_paint.c
+++ b/source/blender/editors/curve/editcurve_paint.c
@@ -978,9 +978,16 @@ static int curve_draw_exec(bContext *C, wmOperator *op)
const struct StrokeElem *selem;
nu->pntsu = stroke_len;
+ nu->pntsv = 1;
nu->type = CU_POLY;
nu->bp = MEM_callocN(nu->pntsu * sizeof(BPoint), __func__);
+ /* Misc settings. */
+ nu->resolu = cu->resolu;
+ nu->resolv = 1;
+ nu->orderu = 4;
+ nu->orderv = 1;
+
BPoint *bp = nu->bp;
BLI_mempool_iternew(cdd->stroke_elem_pool, &iter);