summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Paul <brian.paul@tungstengraphics.com>2008-11-21 17:22:16 -0700
committerBrian Paul <brian.paul@tungstengraphics.com>2008-11-21 17:22:16 -0700
commit4f05893415a2d6f29b29f4daf991ea95a1891a81 (patch)
treefa507d02b4673486afbba56f7efe82cfa23fe496
parentb63a31b36f2e1a198c214f41e0518991b1a8fa49 (diff)
mesa: issue error, don't crash, when calling a prototyped, but undefined function
Bug #18659.
-rw-r--r--src/mesa/shader/slang/slang_codegen.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/shader/slang/slang_codegen.c b/src/mesa/shader/slang/slang_codegen.c
index 882a6534e5..0dacfee1da 100644
--- a/src/mesa/shader/slang/slang_codegen.c
+++ b/src/mesa/shader/slang/slang_codegen.c
@@ -2020,6 +2020,13 @@ _slang_gen_function_call_name(slang_assemble_ctx *A, const char *name,
name);
return NULL;
}
+ if (!fun->body) {
+ slang_info_log_error(A->log,
+ "Function '%s' prototyped but not defined. "
+ "Separate compilation units not supported.",
+ name);
+ return NULL;
+ }
n = _slang_gen_function_call(A, fun, oper, dest);