mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-30 18:22:52 +08:00
fix: ArgumentNullException when blend tree clips are missing/none
fixes: 188
This commit is contained in:
parent
7e9dc20201
commit
0374a9a099
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user