Skip to content

Commit 2b7eb5a

Browse files
authored
WI #1811 Avoid null indirection (#1817)
Co-authored-by: mayanje <jeanchrysostome.mayan@e-i.com>
1 parent 83fecbd commit 2b7eb5a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

TypeCobol.LanguageServer/TypeCobolServer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,7 @@ protected override SignatureHelp OnSignatureHelp(TextDocumentPosition parameters
779779
if (docContext.FileCompiler?.CompilationResultsForProgram?.ProcessedTokensDocumentSnapshot == null) //Semantic snapshot is not available
780780
return null;
781781

782-
var wrappedCodeElement = CodeElementFinder(docContext.FileCompiler, parameters.position).FirstOrDefault();
782+
var wrappedCodeElement = CodeElementFinder(docContext.FileCompiler, parameters.position)?.FirstOrDefault();
783783
if (wrappedCodeElement == null) //No codeelements found
784784
return null;
785785

0 commit comments

Comments
 (0)