From 1f2f6af4bdef30e2a08b54991dff587533318f14 Mon Sep 17 00:00:00 2001 From: Kapil Borle Date: Wed, 17 May 2017 20:09:58 -0700 Subject: [PATCH] Fix NRE in UseSupportsShouldProcess rule --- rules/UseSupportsShouldProcess.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;