From: Vinson Lee Date: Thu, 4 Mar 2010 08:58:36 +0000 (-0800) Subject: glsl: Return NULL on _slan_gen_asm error path on non-debug builds. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3c90777fd7cce57486dc7d98e676ffe9dede55ae;p=mesa.git 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. --- 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);