diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2020-04-17 20:35:24 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2020-04-17 20:41:57 +0300 |
commit | 75ded99ff959d5f0ef819bb726bcdbc0a5a2217e (patch) | |
tree | 1546ed0dda71d18d98ac4eef49252a8369ecf963 /source/blender/blenkernel/intern/gpencil.c | |
parent | e4915730605568816033a141af28bd27124e3abf (diff) |
Fix T75811: GPencil Sculpt not working when use Subdivide
When use the subdivide modifier the number of points was not correct and can produce segment faults.
Also, the points were selected by default and this was wrong.
Diffstat (limited to 'source/blender/blenkernel/intern/gpencil.c')
-rw-r--r-- | source/blender/blenkernel/intern/gpencil.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/gpencil.c b/source/blender/blenkernel/intern/gpencil.c index a0fa07f4a41..041ef0503b9 100644 --- a/source/blender/blenkernel/intern/gpencil.c +++ b/source/blender/blenkernel/intern/gpencil.c @@ -1971,8 +1971,11 @@ void BKE_gpencil_frame_original_pointers_update(const struct bGPDframe *gpf_orig if (i > gps_eval->totpoints - 1) { break; } + bGPDspoint *pt_orig = &gps_orig->points[i]; bGPDspoint *pt_eval = &gps_eval->points[i]; - pt_eval->runtime.pt_orig = &gps_orig->points[i]; + pt_orig->runtime.pt_orig = NULL; + pt_orig->runtime.idx_orig = i; + pt_eval->runtime.pt_orig = pt_orig; pt_eval->runtime.idx_orig = i; } /* Increase pointer. */ |