mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-02-25 13:11:00 +00:00
[qfcc] Check receiver type a second type
The old "expr changed type to error" trick hasn't worked for a while, so sending a message to an undefined class didn't end well.
This commit is contained in:
parent
8db547afec
commit
3aab301d45
1 changed files with 5 additions and 0 deletions
|
@ -219,6 +219,11 @@ message_expr (const expr_t *receiver, keywordarg_t *message)
|
|||
if (!rec_type) {
|
||||
rec_type = get_type (receiver);
|
||||
}
|
||||
if (!rec_type) {
|
||||
auto err = new_expr ();
|
||||
err->type = ex_error;
|
||||
return err;
|
||||
}
|
||||
|
||||
if (receiver->type == ex_error)
|
||||
return receiver;
|
||||
|
|
Loading…
Reference in a new issue