diff --git a/rules/UseSupportsShouldProcess.cs b/rules/UseSupportsShouldProcess.cs index 16d353587..06b10b32f 100644 --- a/rules/UseSupportsShouldProcess.cs +++ b/rules/UseSupportsShouldProcess.cs @@ -65,7 +65,7 @@ private List FindViolations() int whatIfIndex, confirmIndex; ParameterAst whatIfParamAst, confirmParamAst; ParamBlockAst paramBlockAst; - var parameterAsts = functionDefinitionAst.GetParameterAsts(out paramBlockAst).ToArray(); + var parameterAsts = functionDefinitionAst.GetParameterAsts(out paramBlockAst)?.ToArray(); if (parameterAsts == null) { continue;