diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-31 12:32:38 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-07-31 12:39:22 +0300 |
commit | 75f1fb6d86225c9b764f3909e83accc07685b009 (patch) | |
tree | 03beb458fb5bbf315155e477c7f4129ca1989614 /source/blender/depsgraph | |
parent | ad5b611953b6c2b510982e25218552a12d70437c (diff) |
Depsgraph: Fix crash on undo of new bone added
Pose is not brought up to date for until exit of edit mode,
so can not use.
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc index ee814e11d40..22c1167de2a 100644 --- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc +++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc @@ -548,9 +548,13 @@ void update_special_pointers(const Depsgraph *depsgraph, object_cow->runtime.mesh_orig = (Mesh *)object_cow->data; } if (object_cow->type == OB_ARMATURE) { - BKE_pose_remap_bone_pointers((bArmature *)object_cow->data, - object_cow->pose); - update_pose_orig_pointers(object_orig->pose, object_cow->pose); + const bArmature *armature_orig = (bArmature *)object_orig->data; + bArmature *armature_cow = (bArmature *)object_cow->data; + BKE_pose_remap_bone_pointers(armature_cow, object_cow->pose); + if (armature_orig->edbo == NULL) { + update_pose_orig_pointers(object_orig->pose, + object_cow->pose); + } } update_particle_system_orig_pointers(object_orig, object_cow); break; |