fix: NRE from scale adjuster preview

This commit is contained in:
bd_ 2024-10-02 19:43:47 -07:00
parent a71af7ae0a
commit 614663f3a7

View File

@ -344,7 +344,7 @@ namespace nadena.dev.modular_avatar.core.editor
if (proxy == null) return;
var curParent = proxy.transform.parent ?? original.transform.parent;
if (_finalBonesMap.TryGetValue(curParent, out var newRoot))
if (curParent != null && _finalBonesMap.TryGetValue(curParent, out var newRoot))
{
// We need to remember this proxy so we can avoid destroying it when we destroy VirtualAvatarRoot
// in Dispose