Skip to content

Commit

Permalink
Fix null reference exception in ProcVarEnd
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze committed Nov 27, 2024
1 parent 4c2434e commit a12a94d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion DMCompiler/Compiler/DM/DMParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ public DMASTFile File() {

var valType = AsComplexTypes(procParameters);
// the != DMValueType.Null check is a hacky workaround for Anything|Null being equal to just Null
if (valType is null && value.GetUnwrapped() is DMASTInput input && input.Types != DMValueType.Null) {
if (valType is null && value?.GetUnwrapped() is DMASTInput input && input.Types != DMValueType.Null) {
valType = input.Types;
}

Expand Down

0 comments on commit a12a94d

Please sign in to comment.