Fix error on dynamic expressions in static context.

This commit is contained in:
2023-02-19 21:55:01 +08:00
parent 9c73455761
commit e9b2a7f894

View File

@@ -40,7 +40,10 @@ namespace Cryville.Crtr {
ChartPlayer.etor.ContextTransform = rc.Transform; ChartPlayer.etor.ContextTransform = rc.Transform;
if (rc.PropSrcs != null) ChartPlayer.etor.ContextCascadeInsert(rc.PropSrcs); if (rc.PropSrcs != null) ChartPlayer.etor.ContextCascadeInsert(rc.PropSrcs);
foreach (var p in rel.properties) { foreach (var p in rel.properties) {
p.Key.ExecuteStatic(group, ctx, p.Value); try {
p.Key.ExecuteStatic(group, ctx, p.Value);
}
catch (EvaluationFailureException) { }
if (p.Key.IsValueRequired && !p.Value.IsConstant) stack.Properties.Add( if (p.Key.IsValueRequired && !p.Value.IsConstant) stack.Properties.Add(
new DynamicProperty { Context = ctx, Key = p.Key, Value = p.Value } new DynamicProperty { Context = ctx, Key = p.Key, Value = p.Value }
); );