提交 a926d66d 编写于 作者: J Jonathon Marolf

Fix VB Spellchecker Crash

上级 aeee3243
...@@ -37,7 +37,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context) ...@@ -37,7 +37,7 @@ public override async Task RegisterCodeFixesAsync(CodeFixContext context)
// Only bother with identifiers that are at least 3 characters long. // Only bother with identifiers that are at least 3 characters long.
// We don't want to be too noisy as you're just starting to type something. // We don't want to be too noisy as you're just starting to type something.
var nameText = name.GetFirstToken().ValueText; var nameText = name.GetFirstToken().ValueText;
if (nameText.Length >= 3) if (nameText?.Length >= 3)
{ {
semanticModel = semanticModel ?? await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false); semanticModel = semanticModel ?? await document.GetSemanticModelAsync(cancellationToken).ConfigureAwait(false);
var symbolInfo = semanticModel.GetSymbolInfo(name, cancellationToken); var symbolInfo = semanticModel.GetSymbolInfo(name, cancellationToken);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册