diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-05-18 15:23:53 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-05-18 15:23:53 +0300 |
commit | 1cc4ab481e87c0e3f459302bffbdf029545fd42d (patch) | |
tree | d3058f7d87f339e113f5366393a13cd5d5031a3b /source/blender/editors | |
parent | cb50c288d40155684c57eb6bfe5a1730edd190e7 (diff) |
Fix crash drawing polygon curves
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/curve/editcurve_paint.c | 7 |
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); |