Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-10-29 13:06:53 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-10-29 13:48:37 +0300
commit61d49d3448bbe6ea1c7dc8902c83e63757edc734 (patch)
tree2198ec9776b38b9683eaa468c3950d4e55f4b13c /source/blender/blenkernel
parentf887dc1f5c8414f3a5ad6927730a3a74684ddf26 (diff)
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.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r--source/blender/blenkernel/intern/anim_sys.c9
1 files changed, 8 insertions, 1 deletions
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;