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 Feb 6, 2025
1 parent 4494a84 commit e9f13d0
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 @@ -930,7 +930,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 e9f13d0

Please sign in to comment.