From: Brian Paul Date: Sat, 22 Nov 2008 00:22:16 +0000 (-0700) Subject: mesa: issue error, don't crash, when calling a prototyped, but undefined function X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4f05893415a2d6f29b29f4daf991ea95a1891a81;p=mesa.git mesa: issue error, don't crash, when calling a prototyped, but undefined function Bug #18659. --- 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);