diff options
| author | gingerBill <bill@gingerbill.org> | 2024-07-01 12:24:46 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2024-07-01 12:24:46 +0100 |
| commit | a2b23de0a72ad34f09d11c88fcee4062a54b554e (patch) | |
| tree | 1b73d70fa3b0ae10740d6e131151f59a10cfa757 | |
| parent | 42ff7111145e5264ce708edadd69b8c031106c97 (diff) | |
Sanity check for a `nullptr`
| -rw-r--r-- | src/check_expr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index b6e5bc222..2d0b9dfa9 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -6812,7 +6812,9 @@ gb_internal CallArgumentData check_call_arguments_proc_group(CheckerContext *c, for_array(i, procs) { Entity *proc = procs[i]; Type *t = base_type(proc->type); - if (t->kind != Type_Proc) continue; + if (t == nullptr || t->kind != Type_Proc) { + continue; + } TypeProc *pt = &t->Proc; if (pt->param_count == 0) { |