From 61d49d3448bbe6ea1c7dc8902c83e63757edc734 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 29 Oct 2018 11:06:53 +0100 Subject: 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. --- source/blender/blenkernel/intern/anim_sys.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'source/blender/blenkernel') 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; -- cgit v1.2.3