fix: NRE in ScaleAdjusterPreview (#913)

This commit is contained in:
bd_ 2024-07-06 18:42:56 -07:00 committed by GitHub
parent 2efcc670df
commit bdb2dc2a42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -120,7 +120,8 @@ namespace nadena.dev.modular_avatar.core.editor
p_smr.rootBone = _bones.GetBone(o_smr.rootBone)?.proxy ?? o_smr.rootBone; p_smr.rootBone = _bones.GetBone(o_smr.rootBone)?.proxy ?? o_smr.rootBone;
p_smr.bones = o_smr.bones.Select(b => p_smr.bones = o_smr.bones.Select(b =>
{ {
_boneOverrides.TryGetValue(b, out var sa); ModularAvatarScaleAdjuster sa = null;
if (b != null) _boneOverrides.TryGetValue(b, out sa);
return _bones.GetBone(sa, true)?.proxy ?? b; return _bones.GetBone(sa, true)?.proxy ?? b;
}).ToArray(); }).ToArray();