summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian <[email protected]>2007-03-09 16:53:44 -0700
committerBrian <[email protected]>2007-03-09 16:53:44 -0700
commitff95925e70877b9cfe65f66c21ea5ee9ae117ca4 (patch)
tree871c4131702aba695e017e46266dd93254f03c13 /src
parentb9ea9361500979b318574ac69ce656ea3af6a197 (diff)
add NULL ptr check
Diffstat (limited to 'src')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c2
1 files changed, 2 insertions, 0 deletions
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]);