From 3c90777fd7cce57486dc7d98e676ffe9dede55ae Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Thu, 4 Mar 2010 00:58:36 -0800 Subject: glsl: Return NULL on _slan_gen_asm error path on non-debug builds. Exit the function early on the error path, instead of continuing, to prevent a null pointer dereference later on. --- src/mesa/shader/slang/slang_codegen.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c index 6d1cea28a7f..809355c56c9 100644 --- a/src/mesa/shader/slang/slang_codegen.c +++ b/src/mesa/shader/slang/slang_codegen.c @@ -1894,6 +1894,7 @@ _slang_gen_asm(slang_assemble_ctx *A, slang_operation *oper, _mesa_problem(NULL, "undefined __asm function %s\n", (char *) oper->a_id); assert(info); + return NULL; } assert(info->NumParams <= 3); -- cgit v1.2.3