From 782f36d6a87eb622f6052be8ce49c380a6c78e84 Mon Sep 17 00:00:00 2001 From: Antonio Vazquez Date: Sat, 2 Nov 2019 10:28:08 +0100 Subject: 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. --- source/blender/makesdna/DNA_gpencil_types.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_gpencil_types.h b/source/blender/makesdna/DNA_gpencil_types.h index 1435d0a64b4..33dfe66a151 100644 --- a/source/blender/makesdna/DNA_gpencil_types.h +++ b/source/blender/makesdna/DNA_gpencil_types.h @@ -447,17 +447,16 @@ typedef struct bGPdata_Runtime { * - buffer must be initialized before use, but freed after * whole paint operation is over */ - /** Number of elements currently used in cache. */ - short sbuffer_used; /** Flags for stroke that cache represents. */ short sbuffer_sflag; + /** Number of elements currently used in cache. */ + int sbuffer_used; /** Number of total elements available in cache. */ - short sbuffer_size; - char _pad[4]; + int sbuffer_size; /** Number of control-points for stroke. */ int tot_cp_points; - char _pad1_[4]; + char _pad_[4]; /** Array of control-points for stroke. */ bGPDcontrolpoint *cp_points; } bGPdata_Runtime; -- cgit v1.2.3