提交 28713977 编写于 作者: J Jason Malinowski

Update GetHostProject to not crash if we haven't initialized deferred state

The contract is to return null if the ProjectId didn't come from us.
If we don't have deferred state, then we're not even initialized so
it most definitely didn't come from us.
上级 0cf50946
......@@ -113,7 +113,7 @@ internal IVisualStudioHostDocument GetHostDocument(DocumentId documentId)
internal IVisualStudioHostProject GetHostProject(ProjectId projectId)
{
return DeferredState.ProjectTracker.GetProject(projectId);
return DeferredState?.ProjectTracker.GetProject(projectId);
}
private bool TryGetHostProject(ProjectId projectId, out IVisualStudioHostProject project)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册