aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2024-07-01 12:24:46 +0100
committergingerBill <bill@gingerbill.org>2024-07-01 12:24:46 +0100
commita2b23de0a72ad34f09d11c88fcee4062a54b554e (patch)
tree1b73d70fa3b0ae10740d6e131151f59a10cfa757 /src
parent42ff7111145e5264ce708edadd69b8c031106c97 (diff)
Sanity check for a `nullptr`
Diffstat (limited to 'src')
-rw-r--r--src/check_expr.cpp4
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) {