Browse Source

fixed exception when referenced project that was thrown when a referenced project wasn't part of the open project

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/trunk@283 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Markus Palme 21 years ago
parent
commit
5ac7897e3d
  1. 4
      src/Main/Base/Project/Src/Services/ParserService/ProjectContentRegistry.cs

4
src/Main/Base/Project/Src/Services/ParserService/ProjectContentRegistry.cs

@ -69,6 +69,10 @@ namespace ICSharpCode.Core @@ -69,6 +69,10 @@ namespace ICSharpCode.Core
public static IProjectContent GetProjectContentForReference(ReferenceProjectItem item)
{
if (item is ProjectReferenceProjectItem) {
if (((ProjectReferenceProjectItem)item).ReferencedProject == null)
{
return null;
}
return ParserService.GetProjectContent(((ProjectReferenceProjectItem)item).ReferencedProject);
}
lock (contents) {

Loading…
Cancel
Save