From 693898abad7dd7cb6f3ce97159bc9e4391db98d2 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Wed, 21 Aug 2013 00:39:51 +0200 Subject: [PATCH] fix bug in InsertMissingTokensDecorator: unbound generic types have an Identifier node that is null (thus frozen) --- .../OutputVisitor/InsertMissingTokensDecorator.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/InsertMissingTokensDecorator.cs b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/InsertMissingTokensDecorator.cs index 193e798986..4f390d92dc 100644 --- a/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/InsertMissingTokensDecorator.cs +++ b/src/Libraries/NRefactory/ICSharpCode.NRefactory.CSharp/OutputVisitor/InsertMissingTokensDecorator.cs @@ -93,7 +93,8 @@ namespace ICSharpCode.NRefactory.CSharp public override void WriteIdentifier(Identifier identifier) { - identifier.SetStartLocation(locationProvider.Location); + if (!identifier.IsNull) + identifier.SetStartLocation(locationProvider.Location); currentList.Add(identifier); base.WriteIdentifier(identifier); }