mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 05:01:24 +00:00
[qfcc] Check return value for null in has_function_call
Avoids a segfault when dagging. I'm not sure how a switch statement got into the dags, but still don't want a segfault there.
This commit is contained in:
parent
8d69dd85eb
commit
3881147210
1 changed files with 4 additions and 0 deletions
|
@ -1943,6 +1943,10 @@ has_function_call (const expr_t *e)
|
||||||
// in is just a cast of out, if it's not null
|
// in is just a cast of out, if it's not null
|
||||||
return has_function_call (e->inout.out);
|
return has_function_call (e->inout.out);
|
||||||
case ex_return:
|
case ex_return:
|
||||||
|
if (!e->retrn.ret_val) {
|
||||||
|
// if there's no return value, can't possibly have a call
|
||||||
|
return false;
|
||||||
|
}
|
||||||
return has_function_call (e->retrn.ret_val);
|
return has_function_call (e->retrn.ret_val);
|
||||||
case ex_horizontal:
|
case ex_horizontal:
|
||||||
return has_function_call (e->hop.vec);
|
return has_function_call (e->hop.vec);
|
||||||
|
|
Loading…
Reference in a new issue