提交 5e1baba7 编写于 作者: K Kevin Pilch-Bisson

When unloading a head project, there may not be a context project

上级 70b34cf6
......@@ -877,10 +877,11 @@ internal void UpdateDocumentContextIfContainsDocument(IVsHierarchy sharedHierarc
// find that one, we can map back to the open buffer and set its active context to
// the appropriate project.
// Note that if there is a single head project and it's in the process of being unloaded
// there might not be a host project.
var hostProject = LinkedFileUtilities.GetContextHostProject(sharedHierarchy, ProjectTracker);
if (hostProject.Hierarchy == sharedHierarchy)
if (hostProject?.Hierarchy == sharedHierarchy)
{
// How?
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册