Fix premature root node return (#653)

This commit is contained in:
MediaMoots 2023-08-01 06:53:04 +08:00 committed by GitHub
parent d88ceb5211
commit 7343e99b67
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -488,7 +488,15 @@ namespace Toolbox.Library
if (node.HasChildren)
{
foreach (Node child in node.Children)
return GetSklRoot(child, boneNames);
{
Node ChildNode = GetSklRoot(child, boneNames);
if (ChildNode == null)
{
continue;
}
return ChildNode;
}
}
return null;
}