Browse Source

Fixed null reference exception in WriteableProjectEvaluator if a null IProject is returned from the ProjectService.CurrentProject.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/3.0@3808 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 17 years ago
parent
commit
d38d6ae257
  1. 2
      src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs

2
src/Main/Base/Project/Src/Internal/ConditionEvaluators/WriteableProjectEvaluator.cs

@ -20,7 +20,7 @@ namespace ICSharpCode.SharpDevelop @@ -20,7 +20,7 @@ namespace ICSharpCode.SharpDevelop
public bool IsValid(object caller, Condition condition)
{
IProject project = (caller as IProject) ?? ProjectService.CurrentProject;
return !project.ReadOnly;
return project != null && !project.ReadOnly;
}
}
}

Loading…
Cancel
Save