summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gallium/drivers/nv50/nv50_pc_optimize.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/nv50/nv50_pc_optimize.c b/src/gallium/drivers/nv50/nv50_pc_optimize.c
index a1590c2dc6b..4271731efa7 100644
--- a/src/gallium/drivers/nv50/nv50_pc_optimize.c
+++ b/src/gallium/drivers/nv50/nv50_pc_optimize.c
@@ -462,8 +462,10 @@ nv_pass_lower_mods(struct nv_pass *ctx, struct nv_basic_block *b)
mi->saturate = 1;
mi->def[0] = nvi->def[0];
mi->def[0]->insn = mi;
- mi->flags_def = nvi->flags_def;
- mi->flags_def->insn = mi;
+ if (nvi->flags_def) {
+ mi->flags_def = nvi->flags_def;
+ mi->flags_def->insn = mi;
+ }
nv_nvi_delete(nvi);
}
}