summaryrefslogtreecommitdiff
path: root/source/slang/lower-to-ir.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/lower-to-ir.cpp')
-rw-r--r--source/slang/lower-to-ir.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/slang/lower-to-ir.cpp b/source/slang/lower-to-ir.cpp
index 1ee521e3b..6cce469ea 100644
--- a/source/slang/lower-to-ir.cpp
+++ b/source/slang/lower-to-ir.cpp
@@ -2691,7 +2691,7 @@ struct StmtLoweringVisitor : StmtVisitor<StmtLoweringVisitor>
// We just need to look up the basic block that
// corresponds to the break label for that statement,
// and then emit an instruction to jump to it.
- IRBlock* targetBlock;
+ IRBlock* targetBlock = nullptr;
context->shared->breakLabels.TryGetValue(parentStmt, targetBlock);
SLANG_ASSERT(targetBlock);
getBuilder()->emitBreak(targetBlock);
@@ -2710,7 +2710,7 @@ struct StmtLoweringVisitor : StmtVisitor<StmtLoweringVisitor>
// We just need to look up the basic block that
// corresponds to the continue label for that statement,
// and then emit an instruction to jump to it.
- IRBlock* targetBlock;
+ IRBlock* targetBlock = nullptr;
context->shared->continueLabels.TryGetValue(parentStmt, targetBlock);
SLANG_ASSERT(targetBlock);
getBuilder()->emitContinue(targetBlock);