[Bf-blender-cvs] [c63e08863dc] blender-v2.79a-release: Fix T53054: Parentless bone + IK crashes

Campbell Barton noreply at git.blender.org
Sun Jan 7 23:37:41 CET 2018


Commit: c63e08863dc1a208465396795914d0cbe26ffbbb
Author: Campbell Barton
Date:   Mon Oct 16 22:20:34 2017 +1100
Branches: blender-v2.79a-release
https://developer.blender.org/rBc63e08863dc1a208465396795914d0cbe26ffbbb

Fix T53054: Parentless bone + IK crashes

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
M	source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc

===================================================================

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 ceb2fd25f94..f99be191529 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes_rig.cc
@@ -79,6 +79,9 @@ void DepsgraphNodeBuilder::build_ik_pose(Scene *scene, Object *ob, bPoseChannel
 
 	/* Find the chain's root. */
 	bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
+	if (rootchan == NULL) {
+		return;
+	}
 
 	if (has_operation_node(&ob->id, DEG_NODE_TYPE_EVAL_POSE, rootchan->name,
 	                       DEG_OPCODE_POSE_IK_SOLVER))
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
index ca548ed33d0..bde3c0fae10 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_rig.cc
@@ -83,6 +83,9 @@ void DepsgraphRelationBuilder::build_ik_pose(Object *ob,
 	 * - see notes on direction of rel below...
 	 */
 	bPoseChannel *rootchan = BKE_armature_ik_solver_find_root(pchan, data);
+	if (rootchan == NULL) {
+		return;
+	}
 	OperationKey pchan_local_key(&ob->id, DEG_NODE_TYPE_BONE,
 	                             pchan->name, DEG_OPCODE_BONE_LOCAL);
 	OperationKey init_ik_key(&ob->id, DEG_NODE_TYPE_EVAL_POSE, DEG_OPCODE_POSE_INIT_IK);



More information about the Bf-blender-cvs mailing list