Skip to content

Commit 157d1e5

Browse files
committed
lower_cf_instrs: allow for block yield outside functions
1 parent 7853f63 commit 157d1e5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/shady/passes/lower_cf_instrs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,8 @@ static const Node* process_node(Context* ctx, const Node* node) {
160160
switch (node->tag) {
161161
case Let_TAG: return process_let(ctx, node);
162162
case Yield_TAG: {
163-
assert(cfnode);
163+
if (!cfnode)
164+
break;
164165
CFNode* dom = cfnode->idom;
165166
const Node* selection_instr = NULL;
166167
while (dom) {

0 commit comments

Comments
 (0)