diff options
author | Antonio Vazquez <blendergit@gmail.com> | 2021-10-13 17:22:17 +0300 |
---|---|---|
committer | Antonio Vazquez <blendergit@gmail.com> | 2021-10-13 17:22:31 +0300 |
commit | 51ea08487bf8debab4163f1bfe3f2495c50bc403 (patch) | |
tree | 6b1b8b8955ed8656abbf9e94f0122c053b801945 /source/blender | |
parent | 92b7bf4856022bc27f21c5c60be717605d47930e (diff) |
Fix T92185: GPencil memory leak removing stroke from python
The API was not removing the weights, points and traingulation data. Only it was removing the stroke itself.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_gpencil.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_gpencil.c b/source/blender/makesrna/intern/rna_gpencil.c index 2bce5f3f4b3..3f380cd1830 100644 --- a/source/blender/makesrna/intern/rna_gpencil.c +++ b/source/blender/makesrna/intern/rna_gpencil.c @@ -906,7 +906,8 @@ static void rna_GPencil_stroke_remove(ID *id, return; } - BLI_freelinkN(&frame->strokes, stroke); + BLI_remlink(&frame->strokes, stroke); + BKE_gpencil_free_stroke(stroke); RNA_POINTER_INVALIDATE(stroke_ptr); DEG_id_tag_update(&gpd->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_COPY_ON_WRITE); |