From bdb2dc2a426a62b02246cda82d21a72aaa961a8c Mon Sep 17 00:00:00 2001 From: bd_ Date: Sat, 6 Jul 2024 18:42:56 -0700 Subject: [PATCH] fix: NRE in ScaleAdjusterPreview (#913) --- Editor/ScaleAdjuster/ScaleAdjusterPreview.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Editor/ScaleAdjuster/ScaleAdjusterPreview.cs b/Editor/ScaleAdjuster/ScaleAdjusterPreview.cs index b983aafb..fcec4258 100644 --- a/Editor/ScaleAdjuster/ScaleAdjusterPreview.cs +++ b/Editor/ScaleAdjuster/ScaleAdjusterPreview.cs @@ -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.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; }).ToArray();