summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-07-31 09:43:40 -0600
committerBrian <[email protected]>2007-07-31 09:43:40 -0600
commite262d0182f0549a48b0dbe4eec27a30ecd033a1d (patch)
treec5ad43887f1a1895cde00411f8ec4ac8edc9f688
parentaa5b748c10a8537ccbf6ed9d09d0783df7314c70 (diff)
fix failure caused by undeclared variable (bug 11783)
-rw-r--r--src/mesa/shader/slang/slang_codegen.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 8b2bdd74b59..675dd831805 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2056,7 +2056,8 @@ _slang_gen_declaration(slang_assemble_ctx *A, slang_operation *oper)
}
/* XXX make copy of this initializer? */
rhs = _slang_gen_operation(A, &oper->children[0]);
- assert(rhs);
+ if (!rhs)
+ return NULL; /* must have found an error */
init = new_node2(IR_MOVE, var, rhs);
/*assert(rhs->Opcode != IR_SEQ);*/
n = new_seq(varDecl, init);