mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add extra nullptr check
This commit is contained in:
+1
-1
@@ -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) {
|
gb_internal Ast *ast_unary_expr(AstFile *f, Token op, Ast *expr) {
|
||||||
Ast *result = alloc_ast_node(f, Ast_UnaryExpr);
|
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 (...)");
|
syntax_error_with_verbose(expr, "'or_return' within an unary expression not wrapped in parentheses (...)");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user