diff options
author | Antonioya <blendergit@gmail.com> | 2019-02-09 12:59:25 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2019-02-09 12:59:25 +0300 |
commit | b85d5dd9b1a0472b76afa60d29bbbc551ceb6438 (patch) | |
tree | 42fce17170af6c2aa381f2a5dc178208f27ba32d /source/blender/blenloader/intern | |
parent | ade4017293ecf191a87ef5ea2a3f75b41da1b3d2 (diff) |
GP: Init stroke buffer always
Related to T61334
This initialization avoid any crash when user saves the file while he is drawing a stroke session.
Diffstat (limited to 'source/blender/blenloader/intern')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f511bf93be1..09848683f84 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6573,6 +6573,10 @@ static void direct_link_gpencil(FileData *fd, bGPdata *gpd) gpd->adt = newdataadr(fd, gpd->adt); direct_link_animdata(fd, gpd->adt); + /* init stroke buffer */ + gpd->runtime.sbuffer = NULL; + gpd->runtime.sbuffer_size = 0; + /* relink palettes (old palettes deprecated, only to convert old files) */ link_list(fd, &gpd->palettes); if (gpd->palettes.first != NULL) { |