add null check

This commit is contained in:
ousttrue
2021-08-03 13:34:36 +09:00
parent 8d193fd698
commit 6dead3bcd8
2 changed files with 14 additions and 7 deletions

View File

@@ -45,9 +45,13 @@ namespace UniVRM10
if (expressions?.Preset?.LookDown != null) yield return ExpressionKey.LookDown.SubAssetKey;
if (expressions?.Preset?.LookLeft != null) yield return ExpressionKey.LookLeft.SubAssetKey;
if (expressions?.Preset?.LookRight != null) yield return ExpressionKey.LookRight.SubAssetKey;
foreach (var kv in expressions.Custom)
if (expressions.Custom != null)
{
yield return ExpressionKey.CreateCustom(kv.Key).SubAssetKey;
foreach (var kv in expressions.Custom)
{
yield return ExpressionKey.CreateCustom(kv.Key).SubAssetKey;
}
}
}