Skip to content

Commit 51522c4

Browse files
Fix #3190: NRE in YieldReturnDecompiler
1 parent 29861d7 commit 51522c4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ICSharpCode.Decompiler/IL/ControlFlow/YieldReturnDecompiler.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ void ConvertBranchAfterYieldReturn(Block newBlock, Block oldBlock, int pos)
10141014
}
10151015
// We can't use MatchStLoc like above since the doFinallyBodies variable is split by SplitVariables.
10161016
// This occurs for the Legacy VBC compiler.
1017-
if (oldBlock.Instructions[pos].MatchStLoc(out var var, out value) && var.Kind == VariableKind.Local && var.Index == doFinallyBodies.Index)
1017+
if (oldBlock.Instructions[pos].MatchStLoc(out var var, out value) && var.Kind == VariableKind.Local && var.Index == doFinallyBodies?.Index)
10181018
{
10191019
if (!value.MatchLdcI4(0))
10201020
{

0 commit comments

Comments
 (0)