[Mesa-dev] [PATCH 05/10] nir/from_ssa: Don't try to read an invalid instruction
Jason Ekstrand
jason at jlekstrand.net
Thu Feb 5 14:29:00 PST 2015
---
src/glsl/nir/nir_from_ssa.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/glsl/nir/nir_from_ssa.c b/src/glsl/nir/nir_from_ssa.c
index 2e7add3..2ac114d 100644
--- a/src/glsl/nir/nir_from_ssa.c
+++ b/src/glsl/nir/nir_from_ssa.c
@@ -277,7 +277,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;
--
2.2.2
More information about the mesa-dev
mailing list