aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-07-31 09:43:57 -0600
committerBrian <[email protected]>2007-07-31 09:43:57 -0600
commit8410b3f8f9d7041440db0f178c31a5819b16495c (patch)
tree6647dae5dcfc25cb371d19a608744f2a18065264 /src
parent2c0b3d8c4be953e19a04195f53b36cf333e34ec6 (diff)
fix failure caused by undeclared variable (bug 11783)
Diffstat (limited to 'src')
-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 24185cf6770..d368009ca50 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2059,7 +2059,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);