mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
[qfcc] Treat null method return type as id
This prevents a segfault when the method's return type is undefined.
This commit is contained in:
parent
e4ee5c70e0
commit
f544a6f0b0
1 changed files with 4 additions and 0 deletions
|
@ -89,6 +89,10 @@ new_method (type_t *ret_type, param_t *selector, param_t *opt_params)
|
|||
dstring_t *name = dstring_newstr ();
|
||||
dstring_t *types = dstring_newstr ();
|
||||
|
||||
if (!ret_type) {
|
||||
ret_type = &type_id;
|
||||
}
|
||||
|
||||
selector = reverse_params (selector);
|
||||
selector = append_params (selector, opt_params);
|
||||
cmd->next = selector;
|
||||
|
|
Loading…
Reference in a new issue