提交 b8afd807 编写于 作者: A Andrew Casey 提交者: GitHub

Merge pull request #21153 from amcasey/HardenNav154

Handle navigation to a doc ID without a corresponding doc
......@@ -997,6 +997,12 @@ internal override DocumentId GetDocumentIdInCurrentContext(DocumentId documentId
}
var hostDocument = GetHostDocument(documentId);
if (hostDocument == null)
{
// This can happen if the document was temporary and has since been closed/deleted.
return base.GetDocumentIdInCurrentContext(documentId);
}
var itemId = hostDocument.GetItemId();
if (itemId == (uint)VSConstants.VSITEMID.Nil)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册