summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2010-03-04 00:58:36 -0800
committerVinson Lee <[email protected]>2010-03-04 00:58:36 -0800
commit3c90777fd7cce57486dc7d98e676ffe9dede55ae (patch)
treeb92df4928de245ba812e5616fb39cdf725e21b72 /src
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')
-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 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);