diff options
| author | Yong He <yonghe@outlook.com> | 2024-12-20 00:53:24 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-12-20 00:53:24 -0800 |
| commit | 5c9f011fa4948d1f70689b03ddcd203cb2525b2b (patch) | |
| tree | 85b37f7323f921001ddcaa95c43119af1ab234b4 /source | |
| parent | a00db74d1afa717dd90dfcf3170c63d0d1c0d3d7 (diff) | |
Fix crash during loop unrolling. (#5920)
Diffstat (limited to 'source')
| -rw-r--r-- | source/slang/slang-ir-loop-unroll.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/slang/slang-ir-loop-unroll.cpp b/source/slang/slang-ir-loop-unroll.cpp index 5f9c53bc7..6b001a562 100644 --- a/source/slang/slang-ir-loop-unroll.cpp +++ b/source/slang/slang-ir-loop-unroll.cpp @@ -463,6 +463,9 @@ bool unrollLoopsInFunc( for (auto loop : loops) { + if (!loop->parent) + continue; + // Remove any continue jumps from the loop. eliminateContinueBlocks(module, loop); |
