mirror of
https://github.com/bdunderscore/modular-avatar.git
synced 2025-01-31 02:32:53 +08:00
fix: NRE from Menu Item UI when expression parameters is missing (#1022)
Closes: #797
This commit is contained in:
parent
c7df409d70
commit
159865e6cd
@ -275,10 +275,11 @@ namespace nadena.dev.modular_avatar.core.editor
|
|||||||
}
|
}
|
||||||
|
|
||||||
var desc = node?.GetComponent<VRCAvatarDescriptor>();
|
var desc = node?.GetComponent<VRCAvatarDescriptor>();
|
||||||
if (desc != null)
|
if (desc?.expressionParameters?.parameters != null)
|
||||||
{
|
{
|
||||||
foreach (var param in desc.expressionParameters.parameters)
|
foreach (var param in desc.expressionParameters.parameters)
|
||||||
{
|
{
|
||||||
|
if (param == null) continue;
|
||||||
if (emitted.Add(param.name)) yield return (node, param.name);
|
if (emitted.Add(param.name)) yield return (node, param.name);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user