From: Brian Date: Fri, 9 Mar 2007 23:53:44 +0000 (-0700) Subject: add NULL ptr check X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ff95925e70877b9cfe65f66c21ea5ee9ae117ca4;p=mesa.git add NULL ptr check --- diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6587629ebb0..64bb9141bc9 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1167,6 +1167,8 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, kids[0] = kids[1] = kids[2] = NULL; for (j = 0; j < info->NumParams; j++) { kids[j] = _slang_gen_operation(A, &oper->children[firstOperand + j]); + if (!kids[j]) + return NULL; } n = new_node3(info->Opcode, kids[0], kids[1], kids[2]);