From: Brian Date: Tue, 31 Jul 2007 15:43:57 +0000 (-0600) Subject: fix failure caused by undeclared variable (bug 11783) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=8410b3f8f9d7041440db0f178c31a5819b16495c;p=mesa.git fix failure caused by undeclared variable (bug 11783) --- 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);