Fix crash in transform code if there was no active pose channel

This commit is contained in:
Sebastian Parborg 2023-05-12 17:41:58 +02:00
parent 4ecbb3f1d5
commit 846e0801ab
1 changed files with 1 additions and 1 deletions

View File

@ -585,7 +585,7 @@ static void handle_armature_parent_orientation(Object *ob, float r_mat[3][3])
bPoseChannel *active_pchan = BKE_pose_channel_active(ob, false);
/* Check if target bone is a child. */
if (active_pchan->parent) {
if (active_pchan && active_pchan->parent) {
/* For child, show parent local regardless if "local location" is set for parent bone. */
transform_orientations_create_from_axis(r_mat, UNPACK3(active_pchan->parent->pose_mat));
return;