Browse Source

[TypeSystem] GetClassTypeReference: Fixed CurrentAssembly == null

case.
newNRvisualizers
Mike Krüger 13 years ago
parent
commit
ab6f86fa9c
  1. 2
      ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs

2
ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs

@ -100,7 +100,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation @@ -100,7 +100,7 @@ namespace ICSharpCode.NRefactory.TypeSystem.Implementation
}
if (type == null) {
var compilation = context.Compilation;
foreach (var asm in new[] { context.CurrentAssembly }.Concat(compilation.Assemblies)) {
foreach (var asm in (context.CurrentAssembly != null ? new[] { context.CurrentAssembly }.Concat(compilation.Assemblies) : compilation.Assemblies)) {
type = asm.GetTypeDefinition(fullTypeName);
if (type != null)
break;

Loading…
Cancel
Save