You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-13 13:31:48 +00:00
Check for nullptr expression in parse_precedence function
This commit is contained in:
@@ -2107,7 +2107,7 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_precedence(Precedence p_pr
|
|||||||
ExpressionNode *previous_operand = (this->*prefix_rule)(nullptr, p_can_assign);
|
ExpressionNode *previous_operand = (this->*prefix_rule)(nullptr, p_can_assign);
|
||||||
|
|
||||||
while (p_precedence <= get_rule(current.type)->precedence) {
|
while (p_precedence <= get_rule(current.type)->precedence) {
|
||||||
if (p_stop_on_assign && current.type == GDScriptTokenizer::Token::EQUAL) {
|
if (previous_operand == nullptr || (p_stop_on_assign && current.type == GDScriptTokenizer::Token::EQUAL)) {
|
||||||
return previous_operand;
|
return previous_operand;
|
||||||
}
|
}
|
||||||
// Also switch multiline mode on here for infix operators.
|
// Also switch multiline mode on here for infix operators.
|
||||||
|
|||||||
Reference in New Issue
Block a user