mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-04-07 01:42:04 +00:00
[qfcc] Check for errors in call processing
Wasn't nice getting segfaults in the constructor code due to simple errors.
This commit is contained in:
parent
a0f09b13cf
commit
fc519054f2
1 changed files with 6 additions and 1 deletions
|
@ -451,10 +451,15 @@ proc_branch (const expr_t *expr, rua_ctx_t *ctx)
|
|||
scoped_src_loc (expr);
|
||||
if (expr->branch.type == pr_branch_call) {
|
||||
auto target = expr_process (expr->branch.target, ctx);
|
||||
if (is_error (target)) {
|
||||
return target;
|
||||
}
|
||||
auto args = (expr_t *) expr->branch.args;
|
||||
if (expr->branch.args) {
|
||||
args = new_list_expr (nullptr);
|
||||
proc_do_list (&args->list, &expr->branch.args->list, ctx);
|
||||
if (!proc_do_list (&args->list, &expr->branch.args->list, ctx)) {
|
||||
return new_error_expr ();
|
||||
}
|
||||
}
|
||||
return function_expr (target, args);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue