Browse Source

fixed null ptr exception.

newNRvisualizers
Mike Krüger 15 years ago
parent
commit
12be15b982
  1. 7
      ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs

7
ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs

@ -1741,10 +1741,13 @@ namespace ICSharpCode.NRefactory.CSharp @@ -1741,10 +1741,13 @@ namespace ICSharpCode.NRefactory.CSharp
{
if (typeArguments == null)
return;
for (int i = 0; i < typeArguments.Args.Count; i++) {
for (int i = 0; i < typeArguments.Count; i++) {
if (location != null && i > 0 && i - 1 < location.Count)
parent.AddChild (new CSharpTokenNode (Convert (location[i - 1]), 1), InvocationExpression.Roles.Comma);
parent.AddChild ((DomNode)typeArguments.Args[i].Accept (this), InvocationExpression.Roles.TypeParameter);
DomNode arg = (DomNode)typeArguments.Args[i];
if (arg == null)
continue;
parent.AddChild (arg.Accept (this), InvocationExpression.Roles.TypeParameter);
}
}

Loading…
Cancel
Save