提交 0b8a9bbe 编写于 作者: D David Kean

Merge pull request #7569 from dpoeschl/SemanticClassificationNullRefCheap

Fix NullRef in SemanticClassificationViewTaggerProvider (quick & easy version)
......@@ -94,6 +94,11 @@ protected override Task ProduceTagsAsync(TaggerContext<IClassificationTag> conte
var spanToTag = context.SpansToTag.Single();
var document = spanToTag.Document;
if (document == null)
{
return SpecializedTasks.EmptyTask;
}
_classificationService = _classificationService ?? document.Project.LanguageServices.GetService<IEditorClassificationService>();
return SemanticClassificationUtilities.ProduceTagsAsync(context, spanToTag, _classificationService, _typeMap);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册