add NULL ptr check
authorBrian <brian@yutani.localnet.net>
Fri, 9 Mar 2007 23:53:44 +0000 (16:53 -0700)
committerBrian <brian@yutani.localnet.net>
Fri, 9 Mar 2007 23:53:44 +0000 (16:53 -0700)
src/mesa/shader/slang/slang_codegen.c

index 6587629ebb03fbdda9ae26f67610b4c88e182975..64bb9141bc9281534234a44d70fe70217933a68b 100644 (file)
@@ -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]);