Browse Source

check if typearguments is empty (better fix than the last one).

newNRvisualizers
Mike Krüger 15 years ago
parent
commit
eb40e467ca
  1. 4
      ICSharpCode.NRefactory/CSharp/Parser/CSharpParser.cs

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

@ -1739,7 +1739,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -1739,7 +1739,7 @@ namespace ICSharpCode.NRefactory.CSharp
void AddTypeArguments (DomNode parent, LocationsBag.MemberLocations location, Mono.CSharp.TypeArguments typeArguments)
{
if (typeArguments == null)
if (typeArguments == null || typeArguments.IsEmpty)
return;
for (int i = 0; i < typeArguments.Count; i++) {
if (location != null && i > 0 && i - 1 < location.Count)
@ -1753,7 +1753,7 @@ namespace ICSharpCode.NRefactory.CSharp @@ -1753,7 +1753,7 @@ namespace ICSharpCode.NRefactory.CSharp
void AddTypeArguments (DomNode parent, List<Location> location, Mono.CSharp.TypeArguments typeArguments)
{
if (typeArguments == null)
if (typeArguments == null || typeArguments.IsEmpty)
return;
for (int i = 0; i < typeArguments.Count; i++) {
if (location != null && i > 0 && i - 1 < location.Count)

Loading…
Cancel
Save