fix: ArgumentNullException when blend tree clips are missing/none

fixes: 188
This commit is contained in:
bd_ 2023-01-26 18:32:22 +09:00
parent 7e9dc20201
commit 0374a9a099

View File

@ -20,7 +20,7 @@ namespace nadena.dev.modular_avatar.core.editor
internal ClipHolder(Motion clip)
{
CurrentClip = OriginalClip = clip;
IsProxyAnimation = Util.IsProxyAnimation(clip);
IsProxyAnimation = clip != null && Util.IsProxyAnimation(clip);
}
}
@ -135,6 +135,11 @@ namespace nadena.dev.modular_avatar.core.editor
Dictionary<Motion, ClipHolder> originalToHolder
)
{
if (motion == null)
{
return new ClipHolder(null);
}
if (originalToHolder.TryGetValue(motion, out var holder))
{
return holder;