fix: NRE from scale adjuster preview (#1251)

This commit is contained in:
bd_ 2024-10-02 19:51:17 -07:00 committed by GitHub
parent 4ec36ca489
commit 816d2b28cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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