diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-14 18:54:56 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-14 19:15:41 +0300 |
commit | 10bab568d3392dcd9feb11597d308c9ddc208c7a (patch) | |
tree | 386f03a403a63dd677384baf56affe52be295335 | |
parent | b44e6f2b3d32e604c3030eaf61b15e0e2a20d520 (diff) |
Fix assertion failure evaluating depsgraph on an empty armature.
If there are no bones, chan_array may not be allocated.
-rw-r--r-- | source/blender/blenkernel/intern/armature_update.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/armature_update.c b/source/blender/blenkernel/intern/armature_update.c index ce87050f8bf..c9e072caa6e 100644 --- a/source/blender/blenkernel/intern/armature_update.c +++ b/source/blender/blenkernel/intern/armature_update.c @@ -760,9 +760,8 @@ void BKE_pose_eval_cleanup(struct Depsgraph *depsgraph, /* release the IK tree */ BIK_release_tree(scene, ob, ctime); - BLI_assert(pose->chan_array != NULL); - MEM_freeN(pose->chan_array); - pose->chan_array = NULL; + BLI_assert(pose->chan_array != NULL || BLI_listbase_is_empty(&pose->chanbase)); + MEM_SAFE_FREE(pose->chan_array); } void BKE_pose_eval_proxy_init(struct Depsgraph *depsgraph, Object *object) |