diff --git a/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs b/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs index 571bb04c4..6b28ac2f5 100644 --- a/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs +++ b/ICSharpCode.Decompiler/IL/Transforms/TransformCollectionAndObjectInitializers.cs @@ -80,7 +80,6 @@ namespace ICSharpCode.Decompiler.IL.Transforms default: return false; } - context.Step("CollectionOrObjectInitializer", inst); int initializerItemsCount = 0; var blockType = initializerBlock?.Type ?? BlockType.CollectionInitializer; var possibleIndexVariables = new Dictionary(); @@ -98,6 +97,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms } if (initializerItemsCount <= 0) return false; + context.Step("CollectionOrObjectInitializer", inst); ILVariable finalSlot; if (initializerBlock == null) { initializerBlock = new Block(blockType);