diff options
| author | gingerBill <bill@gingerbill.org> | 2023-04-27 11:16:02 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2023-04-27 11:16:02 +0100 |
| commit | d6d34bd62f816d1ebb6e04d516520be1f47acd85 (patch) | |
| tree | 670d4363e2c46bc4d4bb057ae5877ddb6926fced /src/parser.cpp | |
| parent | 68dde07d5d78d879f7edba9c09297661212d6b11 (diff) | |
Add extra nullptr check
Diffstat (limited to 'src/parser.cpp')
| -rw-r--r-- | src/parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.cpp b/src/parser.cpp index b7c097502..f33a44f31 100644 --- a/src/parser.cpp +++ b/src/parser.cpp @@ -516,7 +516,7 @@ gb_internal Ast *ast_tag_expr(AstFile *f, Token token, Token name, Ast *expr) { gb_internal Ast *ast_unary_expr(AstFile *f, Token op, Ast *expr) { Ast *result = alloc_ast_node(f, Ast_UnaryExpr); - if (expr->kind == Ast_OrReturnExpr) { + if (expr && expr->kind == Ast_OrReturnExpr) { syntax_error_with_verbose(expr, "'or_return' within an unary expression not wrapped in parentheses (...)"); } |