summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir
diff options
context:
space:
mode:
Diffstat (limited to 'src/glsl/nir')
-rw-r--r--src/glsl/nir/glsl_to_nir.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/nir/glsl_to_nir.cpp b/src/glsl/nir/glsl_to_nir.cpp
index d1e2488a69e..f8f3fd85bd4 100644
--- a/src/glsl/nir/glsl_to_nir.cpp
+++ b/src/glsl/nir/glsl_to_nir.cpp
@@ -1036,7 +1036,8 @@ nir_visitor::add_instr(nir_instr *instr, unsigned num_components)
{
nir_dest *dest = get_instr_dest(instr);
- nir_ssa_dest_init(instr, dest, num_components, NULL);
+ if (dest)
+ nir_ssa_dest_init(instr, dest, num_components, NULL);
nir_instr_insert_after_cf_list(this->cf_node_list, instr);
this->result = instr;