Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-10-13 17:22:17 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2021-11-02 14:35:22 +0300
commitdff17b0893c5c8c23c68531557109d1f053933ac (patch)
tree43ff320afcdf6c98c4854ccbb1f7a16864171e8e
parentd3f047028909a2de7d68720eedd22269fba55e76 (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.
-rw-r--r--source/blender/makesrna/intern/rna_gpencil.c3
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 44de5955c41..149b0d293e3 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);