[Bf-blender-cvs] [31849ca] master: Fix for random crashes when grabbing (rmb-drag) NLA strips

Joshua Leung noreply at git.blender.org
Fri May 9 14:19:56 CEST 2014


Commit: 31849cafc26ad3e90ba308a14df5bd6ca66a4cbb
Author: Joshua Leung
Date:   Sat May 10 00:18:47 2014 +1200
https://developer.blender.org/rB31849cafc26ad3e90ba308a14df5bd6ca66a4cbb

Fix for random crashes when grabbing (rmb-drag) NLA strips

Although these crashes were quite sporadic, they seemed to happen most when
rmb-dragging strips randomly in quick succession. The most likely cause seems
to be a null check I accidentally took out during one of my commits yesterday.

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

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

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

diff --git a/source/blender/blenkernel/intern/anim_sys.c b/source/blender/blenkernel/intern/anim_sys.c
index ef6f5fb..ee52489 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -2140,10 +2140,12 @@ static void nlastrip_evaluate_meta(PointerRNA *ptr, ListBase *channels, ListBase
 	/* directly evaluate child strip into accumulation buffer... 
 	 * - there's no need to use a temporary buffer (as it causes issues [T40082])
 	 */
-	nlastrip_evaluate(ptr, channels, &tmp_modifiers, tmp_nes);
-	
-	/* free temp eval-strip */
-	MEM_freeN(tmp_nes);
+	if (tmp_nes) {
+		nlastrip_evaluate(ptr, channels, &tmp_modifiers, tmp_nes);
+		
+		/* free temp eval-strip */
+		MEM_freeN(tmp_nes);
+	}
 	
 	/* unlink this strip's modifiers from the parent's modifiers again */
 	nlaeval_fmodifiers_split_stacks(&strip->modifiers, modifiers);
@@ -2153,7 +2155,7 @@ static void nlastrip_evaluate_meta(PointerRNA *ptr, ListBase *channels, ListBase
 void nlastrip_evaluate(PointerRNA *ptr, ListBase *channels, ListBase *modifiers, NlaEvalStrip *nes)
 {
 	NlaStrip *strip = nes->strip;
-
+	
 	/* to prevent potential infinite recursion problems (i.e. transition strip, beside meta strip containing a transition
 	 * several levels deep inside it), we tag the current strip as being evaluated, and clear this when we leave
 	 */




More information about the Bf-blender-cvs mailing list