From a12a94d43204de989aeca1763db6a0f2964e55c9 Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Wed, 27 Nov 2024 17:48:13 -0500 Subject: [PATCH] Fix null reference exception in ProcVarEnd --- DMCompiler/Compiler/DM/DMParser.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DMCompiler/Compiler/DM/DMParser.cs b/DMCompiler/Compiler/DM/DMParser.cs index d69fd75b88..65ad019b9e 100644 --- a/DMCompiler/Compiler/DM/DMParser.cs +++ b/DMCompiler/Compiler/DM/DMParser.cs @@ -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; }