[Bf-blender-cvs] [158c891] master: Clear animation list to avoid referencing freed memory.

Antony Riakiotakis noreply at git.blender.org
Tue May 19 16:16:01 CEST 2015


Commit: 158c891520eecfcf9d7fcb5fb1d396112ac23abc
Author: Antony Riakiotakis
Date:   Tue May 19 16:15:38 2015 +0200
Branches: master
https://developer.blender.org/rB158c891520eecfcf9d7fcb5fb1d396112ac23abc

Clear animation list to avoid referencing freed memory.

===================================================================

M	source/blender/blenkernel/intern/sequencer.c

===================================================================

diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index 5429d11..d4d64af 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




More information about the Bf-blender-cvs mailing list