From ab6f86fa9c8cad75a91af0d44a33e158aa14024f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Kr=C3=BCger?= Date: Thu, 13 Sep 2012 18:19:01 +0200 Subject: [PATCH] [TypeSystem] GetClassTypeReference: Fixed CurrentAssembly == null case. --- .../TypeSystem/Implementation/GetClassTypeReference.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs b/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs index 527eac9972..666b17f4b3 100644 --- a/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs +++ b/ICSharpCode.NRefactory/TypeSystem/Implementation/GetClassTypeReference.cs @@ -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;