From c1287389269cd4b70711d2b55bfeb3b87d695c9a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Wed, 4 Apr 2018 11:49:01 +0200 Subject: Depsgraph: Ensure root pchan is always found --- source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source') diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc index b9a53c69070..4e1de16235c 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc @@ -98,6 +98,7 @@ void DepsgraphNodeBuilder::build_ik_pose(Object *object, } int rootchan_index = BLI_findindex(&object->pose->chanbase, rootchan); + BLI_assert(rootchan_index != -1); /* Operation node for evaluating/running IK Solver. */ add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, function_bind(BKE_pose_iktree_evaluate, @@ -122,6 +123,7 @@ void DepsgraphNodeBuilder::build_splineik_pose(Object *object, * Store the "root bone" of this chain in the solver, so it knows where to start. */ int rootchan_index = BLI_findindex(&object->pose->chanbase, rootchan); + BLI_assert(rootchan_index != -1); add_operation_node(&object->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name, function_bind(BKE_pose_splineik_evaluate, _1, -- cgit v1.2.3