fix: nullref from Setup Outfit on non-humanoid rigs (#746)

Closes: #742
This commit is contained in:
bd_ 2024-03-08 00:59:21 -08:00 committed by GitHub
parent fcc3752bcc
commit d85bbb257c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -387,7 +387,7 @@ namespace nadena.dev.modular_avatar.core.editor
? outfitAnimator.GetBoneTransform(HumanBodyBones.Hips)?.gameObject
: null;
if (outfitHips.transform.parent == outfitRoot.transform)
if (outfitHips != null && outfitHips.transform.parent == outfitRoot.transform)
{
// Sometimes broken rigs can have the hips as a direct child of the root, instead of having
// an intermediate Armature object. We do not currently support this kind of rig, and so we'll