diff options
| author | Jeroen van Rijn <Kelimion@users.noreply.github.com> | 2025-06-03 15:39:09 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-03 15:39:09 +0200 |
| commit | dd27049e138b9065c080ce2389e5ede131b83a12 (patch) | |
| tree | 1c8b9c688c9740f77cdcb9cb73ac037e85f7ac79 /src/check_expr.cpp | |
| parent | fab7715c350e8d9289bf5635d94553d6d30a6490 (diff) | |
| parent | d1fcec63cc9c34e13b20d5815abdba7ae80b78c1 (diff) | |
Merge pull request #5261 from spiel0meister/master
add a missing nullptr check
Diffstat (limited to 'src/check_expr.cpp')
| -rw-r--r-- | src/check_expr.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index ce1ac51ea..99d464da5 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -263,6 +263,9 @@ gb_internal void check_did_you_mean_scope(String const &name, Scope *scope, char gb_internal Entity *entity_from_expr(Ast *expr) { expr = unparen_expr(expr); + if (expr == nullptr) { + return nullptr; + } switch (expr->kind) { case Ast_Ident: return expr->Ident.entity; |