[Bf-blender-cvs] [61d49d3448b] blender2.8: Fix T57360: Crash when Play Animation in this scene

Sergey Sharybin noreply at git.blender.org
Mon Oct 29 11:48:42 CET 2018


Commit: 61d49d3448bbe6ea1c7dc8902c83e63757edc734
Author: Sergey Sharybin
Date:   Mon Oct 29 11:06:53 2018 +0100
Branches: blender2.8
https://developer.blender.org/rB61d49d3448bbe6ea1c7dc8902c83e63757edc734

Fix T57360: Crash when Play Animation in this scene

Was caused by a code which was putting animation value back to
original datablock.

The tricky part here is that we don't always know ID, so can not
put those values. Would be nice to have a solution for this, but
for until then we should be relatively good.

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

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 9f356ab7149..f591037322d 100644
--- a/source/blender/blenkernel/intern/anim_sys.c
+++ b/source/blender/blenkernel/intern/anim_sys.c
@@ -1686,7 +1686,14 @@ static void animsys_write_orig_anim_rna(
         FCurve *fcu,
         float value)
 {
-	/* Pointer is expected to be an ID pointer, if it's not -- we are doomed. */
+	/* Pointer is expected to be an ID pointer, if it's not -- we are doomed.
+	 *
+	 * NOTE: It is possible to have animation data on NLA strip, see T57360.
+	 * TODO(sergey): Find solution for those cases.
+	 */
+	if (ptr->id.data == NULL) {
+		return;
+	}
 	PointerRNA orig_ptr = *ptr;
 	orig_ptr.id.data = ((ID *)orig_ptr.id.data)->orig_id;
 	orig_ptr.data = orig_ptr.id.data;



More information about the Bf-blender-cvs mailing list