lang: add null pointer check to arith_parse_left_paren

this fixes a crash that occurred when the call-operator was used on a lone ident in an expression.
This commit is contained in:
2025-04-03 10:48:41 +01:00
parent 6f9f299182
commit df8d9689d1

View File

@@ -598,7 +598,7 @@ struct token_parse_result arith_parse_left_paren(
struct ivy_ast_node *msg
= b_unbox(struct ivy_ast_node, msg_entry, n_entry);
if (msg->n_type != IVY_AST_MSG) {
if (!msg || msg->n_type != IVY_AST_MSG) {
/* this is not a complex message, it's probably a
* call-operator */
goto not_complex_msg;