summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir
diff options
context:
space:
mode:
authorTimothy Arceri <timothy.arceri@collabora.com>2016-08-21 18:31:40 +1000
committerTimothy Arceri <timothy.arceri@collabora.com>2016-08-23 09:06:29 +1000
commit8ee909ee4261bc2d4396851c44219f07041cd85c (patch)
tree725a7910b759527b76cd8f18d04e78316147f818 /src/compiler/nir
parent47e3cc7557144ea62cab65c86f0241ec53784d71 (diff)
downloadexternal_mesa3d-8ee909ee4261bc2d4396851c44219f07041cd85c.tar.gz
external_mesa3d-8ee909ee4261bc2d4396851c44219f07041cd85c.tar.bz2
external_mesa3d-8ee909ee4261bc2d4396851c44219f07041cd85c.zip
nir: avoid segfault when ssa src not found
Without this the following line will segfault and we don't get to see the results of the validate_assert() above. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
Diffstat (limited to 'src/compiler/nir')
-rw-r--r--src/compiler/nir/nir_validate.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/compiler/nir/nir_validate.c b/src/compiler/nir/nir_validate.c
index d0c9be2d8a..60af71550b 100644
--- a/src/compiler/nir/nir_validate.c
+++ b/src/compiler/nir/nir_validate.c
@@ -173,6 +173,9 @@ validate_ssa_src(nir_src *src, validate_state *state)
validate_assert(state, entry);
+ if (!entry)
+ return;
+
ssa_def_validate_state *def_state = (ssa_def_validate_state *)entry->data;
validate_assert(state, def_state->where_defined == state->impl &&