don't ignore return value of _slang_codegen_global_variable()
authorBrian <brian@yutani.localnet.net>
Fri, 11 May 2007 21:34:29 +0000 (15:34 -0600)
committerBrian <brian@yutani.localnet.net>
Fri, 11 May 2007 21:34:29 +0000 (15:34 -0600)
src/mesa/shader/slang/slang_compile.c

index f23a29633bd0b25e8d46a01720fd569fc2a3e842..a4dd5b8b4ae237d8400a2d85b530cd6f1308213f 100644 (file)
@@ -1618,7 +1618,8 @@ parse_init_declarator(slang_parse_ctx * C, slang_output_ctx * O,
       A.program = O->program;
       A.vartable = O->vartable;
       A.curFuncEndLabel = NULL;
-      _slang_codegen_global_variable(&A, var, C->type);
+      if (!_slang_codegen_global_variable(&A, var, C->type))
+         return 0;
    }
 
    /* allocate global address space for a variable with a known size */