summaryrefslogtreecommitdiff
path: root/src/mesa/shader
diff options
context:
space:
mode:
authorVinson Lee <vlee@vmware.com>2010-03-04 00:58:36 -0800
committerVinson Lee <vlee@vmware.com>2010-03-04 00:58:36 -0800
commit3c90777fd7cce57486dc7d98e676ffe9dede55ae (patch)
treeb92df4928de245ba812e5616fb39cdf725e21b72 /src/mesa/shader
parentdf20c3943ab4e20055f8e731f112aa9fd8d66068 (diff)
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.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r--src/mesa/shader/slang/slang_codegen.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 6d1cea28a7..809355c56c 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);