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:
authorCampbell Barton <campbell@blender.org>2022-04-05 02:22:32 +0300
committerCampbell Barton <campbell@blender.org>2022-04-05 02:23:14 +0300
commit25a283acce6b34690468d5a521a44c16ee211c2d (patch)
treee0eb9cd467696681b69159aca8bfe321c1c2cf95 /source/blender
parent11183ebc3c1437974cf16b94e4bf611c15538364 (diff)
Fix memory leak duplicating sequencer strips
Regression in [0] also skip creating a GSet when there are no F-curves. [0]: e74420124f3a429ad8a1492e56a7e1561d86d6f7
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/sequencer/intern/animation.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/sequencer/intern/animation.c b/source/blender/sequencer/intern/animation.c
index 27f7316e042..a908bb01d35 100644
--- a/source/blender/sequencer/intern/animation.c
+++ b/source/blender/sequencer/intern/animation.c
@@ -126,10 +126,15 @@ void SEQ_animation_restore_original(Scene *scene, ListBase *list)
void SEQ_animation_duplicate(Scene *scene, Sequence *seq, ListBase *list)
{
+ if (BLI_listbase_is_empty(list)) {
+ return;
+ }
+
GSet *fcurves = SEQ_fcurves_by_strip_get(seq, list);
GSET_FOREACH_BEGIN (FCurve *, fcu, fcurves) {
FCurve *fcu_cpy = BKE_fcurve_copy(fcu);
BLI_addtail(&scene->adt->action->curves, fcu_cpy);
}
GSET_FOREACH_END();
+ BLI_gset_free(fcurves, NULL);
}