From 83914ebc44dc2e7cc86df91eaf0a2df0898f33f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Srbeck=C3=BD?= Date: Tue, 15 Feb 2011 23:05:29 +0000 Subject: [PATCH] Minor fix of the last commit --- ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs b/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs index 47534ea96..8ff25a4f3 100644 --- a/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs +++ b/ICSharpCode.Decompiler/Ast/AstMethodBodyBuilder.cs @@ -118,8 +118,9 @@ namespace Decompiler yield return new Ast.LabelStatement { Label = ((ILLabel)node).Name }; } else if (node is ILExpression) { List ilRanges = ((ILExpression)node).GetILRanges(); - AstNode codeExpr = TransformExpression((ILExpression)node).WithAnnotation(ilRanges); + AstNode codeExpr = TransformExpression((ILExpression)node); if (codeExpr != null) { + codeExpr = codeExpr.WithAnnotation(ilRanges); if (codeExpr is Ast.Expression) { yield return new Ast.ExpressionStatement { Expression = (Ast.Expression)codeExpr }; } else if (codeExpr is Ast.Statement) {