diff options
author | Antony Riakiotakis <kalast@gmail.com> | 2015-05-19 17:15:38 +0300 |
---|---|---|
committer | Antony Riakiotakis <kalast@gmail.com> | 2015-05-19 17:15:55 +0300 |
commit | 158c891520eecfcf9d7fcb5fb1d396112ac23abc (patch) | |
tree | 575c1aba6692e2dbb45ed80206b7bff8575021be /source/blender/blenkernel | |
parent | df0a1fa3c5de560ddddc87b6694b6ee224422af8 (diff) |
Clear animation list to avoid referencing freed memory.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/sequencer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c index 5429d113518..d4d64af6c94 100644 --- a/source/blender/blenkernel/intern/sequencer.c +++ b/source/blender/blenkernel/intern/sequencer.c @@ -254,15 +254,15 @@ void BKE_sequence_free_anim(Sequence *seq) { while (seq->anims.last) { StripAnim *sanim = seq->anims.last; - BLI_remlink(&seq->anims, sanim); if (sanim->anim) { IMB_free_anim(sanim->anim); sanim->anim = NULL; } - MEM_freeN(sanim); + BLI_freelinkN(&seq->anims, sanim); } + BLI_listbase_clear(&seq->anims); } /* cache must be freed before calling this function |