summaryrefslogtreecommitdiff
path: root/Userland
diff options
context:
space:
mode:
Diffstat (limited to 'Userland')
-rw-r--r--Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
index 376705fb3e..734c345600 100644
--- a/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
+++ b/Userland/Libraries/LibJS/Bytecode/ASTCodegen.cpp
@@ -2254,10 +2254,10 @@ Bytecode::CodeGenerationErrorOr<void> TryStatement::generate_bytecode(Bytecode::
if (m_finalizer) {
generator.emit<Bytecode::Op::Jump>(finalizer_target);
} else {
- auto& block = generator.make_block();
+ if (!next_block)
+ next_block = &generator.make_block();
generator.emit<Bytecode::Op::LeaveUnwindContext>();
- generator.emit<Bytecode::Op::Jump>(Bytecode::Label { block });
- next_block = &block;
+ generator.emit<Bytecode::Op::Jump>(Bytecode::Label { *next_block });
}
}