summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/glsl/nir/nir_from_ssa.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c
index 3625237dd3d..7c500957767 100644
--- a/src/glsl/nir/nir_from_ssa.c
+++ b/src/glsl/nir/nir_from_ssa.c
@@ -272,7 +272,7 @@ get_parallel_copy_at_end_of_block(nir_block *block)
if (last_instr->type == nir_instr_type_jump)
last_instr = nir_instr_prev(last_instr);
- if (last_instr->type == nir_instr_type_parallel_copy)
+ if (last_instr && last_instr->type == nir_instr_type_parallel_copy)
return nir_instr_as_parallel_copy(last_instr);
else
return NULL;