Skip to content

Commit

Permalink
Fix ArgumentNullException when using Expression and OrbitGenerator Be…
Browse files Browse the repository at this point in the history
…haviour together (#35)

The latter creates AlwaysTrue parameter which doesn't have an ID
  • Loading branch information
IO5 authored Jan 6, 2024
1 parent ef2eaa2 commit b57a94a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/ContractConfigurator/Behaviour/Expression.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ protected override void OnCompleted()

protected override void OnParameterStateChange(ContractParameter param)
{
if (param.State == ParameterState.Complete && onParameterComplete.ContainsKey(param.ID))
if (param.ID != null && param.State == ParameterState.Complete && onParameterComplete.ContainsKey(param.ID))
{
ExecuteExpressions(onParameterComplete[param.ID]);
onParameterComplete[param.ID].Clear();
Expand Down

0 comments on commit b57a94a

Please sign in to comment.