From 4bd5b48c7c2108362fcb6727fb95f19678bccb6d Mon Sep 17 00:00:00 2001 From: Chris52886 Date: Thu, 2 Dec 2021 20:15:45 -0500 Subject: [PATCH] fixed crash --- .../Source/Smartsuit/Private/SmartsuitPoseNode.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Plugins/Smartsuit/Source/Smartsuit/Private/SmartsuitPoseNode.cpp b/Plugins/Smartsuit/Source/Smartsuit/Private/SmartsuitPoseNode.cpp index fa4494a..9e23def 100644 --- a/Plugins/Smartsuit/Source/Smartsuit/Private/SmartsuitPoseNode.cpp +++ b/Plugins/Smartsuit/Source/Smartsuit/Private/SmartsuitPoseNode.cpp @@ -674,6 +674,12 @@ void FSmartsuitPoseNode::EvaluateSkeletalControl_AnyThread(FComponentSpacePoseCo const FBoneContainer& BoneContainer = MeshBases.GetPose().GetBoneContainer(); FCompactPoseBoneIndex CompactPoseBoneToModify = BoneMap.hip.GetCompactPoseIndex(BoneContainer); + + if (CompactPoseBoneToModify == -1) + { + return; + } + FTransform NewBoneTM = MeshBases.GetLocalSpaceTransform(CompactPoseBoneToModify);//.GetComponentSpaceTransform(CompactPoseBoneToModify); float testval1 = NewBoneTM.GetLocation().Size();