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:
@@ -598,7 +598,7 @@ struct token_parse_result arith_parse_left_paren(
|
|||||||
struct ivy_ast_node *msg
|
struct ivy_ast_node *msg
|
||||||
= b_unbox(struct ivy_ast_node, msg_entry, n_entry);
|
= 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
|
/* this is not a complex message, it's probably a
|
||||||
* call-operator */
|
* call-operator */
|
||||||
goto not_complex_msg;
|
goto not_complex_msg;
|
||||||
|
|||||||
Reference in New Issue
Block a user