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:
authorAlexander Gavrilov <angavrilov@gmail.com>2018-11-14 18:54:56 +0300
committerAlexander Gavrilov <angavrilov@gmail.com>2018-11-14 19:15:41 +0300
commit10bab568d3392dcd9feb11597d308c9ddc208c7a (patch)
tree386f03a403a63dd677384baf56affe52be295335 /source/blender/blenkernel/intern/armature_update.c
parentb44e6f2b3d32e604c3030eaf61b15e0e2a20d520 (diff)
Fix assertion failure evaluating depsgraph on an empty armature.
If there are no bones, chan_array may not be allocated.
Diffstat (limited to 'source/blender/blenkernel/intern/armature_update.c')
-rw-r--r--source/blender/blenkernel/intern/armature_update.c5
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)