summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/nir/nir_control_flow.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/glsl/nir/nir_control_flow.c b/src/glsl/nir/nir_control_flow.c
index 87bc7163efd..55d0689c45e 100644
--- a/src/glsl/nir/nir_control_flow.c
+++ b/src/glsl/nir/nir_control_flow.c
@@ -99,10 +99,10 @@ unlink_blocks(nir_block *pred, nir_block *succ)
static void
unlink_block_successors(nir_block *block)
{
- if (block->successors[0] != NULL)
- unlink_blocks(block, block->successors[0]);
if (block->successors[1] != NULL)
unlink_blocks(block, block->successors[1]);
+ if (block->successors[0] != NULL)
+ unlink_blocks(block, block->successors[0]);
}
static void