diff options
author | Brian Paul <[email protected]> | 2008-11-21 17:22:16 -0700 |
---|---|---|
committer | Brian Paul <[email protected]> | 2008-11-24 13:11:05 -0700 |
commit | e545ce2af41b2b70aabdc3441a63f4f9296a3d65 (patch) | |
tree | 0784141c91e3e7105c600eb4cb5c9f3543c22813 /src/mesa/shader | |
parent | ca142c2c0841f205b9224ad719c1b01c2303b5a3 (diff) |
mesa: issue error, don't crash, when calling a prototyped, but undefined function
Bug #18659.
Diffstat (limited to 'src/mesa/shader')
-rw-r--r-- | src/mesa/shader/slang/slang_codegen.c | 7 |
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 882a6534e57..0dacfee1da2 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); |