diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2019-11-02 12:28:08 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2019-11-02 12:28:37 +0300 |
commit | 782f36d6a87eb622f6052be8ce49c380a6c78e84 (patch) | |
tree | 739231fb09098f0b1138951bb492b679181fa4ff /source/blender/editors/gpencil/gpencil_paint.c | |
parent | 018b754fb6c7ac485e1f3d8b66f0ddeee3772989 (diff) |
Fix T71260: GPencil crash when drawing very long lines
There were two problems:
1) When the buffer was reallocate, the pointer was corrupted.
2) Short variables were too small to hold long lines.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_paint.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/gpencil/gpencil_paint.c b/source/blender/editors/gpencil/gpencil_paint.c index f29e782c618..bebdcb34326 100644 --- a/source/blender/editors/gpencil/gpencil_paint.c +++ b/source/blender/editors/gpencil/gpencil_paint.c @@ -3660,7 +3660,6 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) tGPsdata *p = op->customdata; ToolSettings *ts = CTX_data_tool_settings(C); GP_Sculpt_Guide *guide = &p->scene->toolsettings->gp_sculpt.guide; - tGPspoint *points = (tGPspoint *)p->gpd->runtime.sbuffer; /* default exit state - pass through to support MMB view nav, etc. */ int estate = OPERATOR_PASS_THROUGH; @@ -3969,6 +3968,7 @@ static int gpencil_draw_modal(bContext *C, wmOperator *op, const wmEvent *event) int size_after = p->gpd->runtime.sbuffer_used; /* Last point of the event is always real (not fake). */ + tGPspoint *points = (tGPspoint *)p->gpd->runtime.sbuffer; tGPspoint *pt = &points[size_after - 1]; pt->tflag &= ~GP_TPOINT_FAKE; |