Skip to content
Browse files

Fixed parser bug.

  • Loading branch information...
1 parent 59ce505 commit 85e117376786a7a71a3f7eb621008504692d6c7f @mkrueger mkrueger committed Oct 28, 2011
Showing with 2 additions and 1 deletion.
  1. +2 −1 ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs
View
3 ICSharpCode.NRefactory.CSharp/Parser/CSharpParser.cs
@@ -1588,7 +1588,8 @@ public UsingStatement CreateUsingStatement (Block blockStatement)
}
cur = u.Statement;
usingResult.AddChild (new CSharpTokenNode (Convert (blockStatement.EndLocation), 1), UsingStatement.Roles.RPar);
- usingResult.AddChild ((Statement)cur.Accept (this), UsingStatement.Roles.EmbeddedStatement);
+ if (cur != null)
+ usingResult.AddChild ((Statement)cur.Accept (this), UsingStatement.Roles.EmbeddedStatement);
}
return usingResult;
}

0 comments on commit 85e1173

Please sign in to comment.
Something went wrong with that request. Please try again.