You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Merge pull request #52706 from vnen/gdscript-ternary-operator-crash
GDScript: Show error when missing expression after ternary else
This commit is contained in:
@@ -2287,6 +2287,10 @@ GDScriptParser::ExpressionNode *GDScriptParser::parse_ternary_operator(Expressio
|
||||
|
||||
operation->false_expr = parse_precedence(PREC_TERNARY, false);
|
||||
|
||||
if (operation->false_expr == nullptr) {
|
||||
push_error(R"(Expected expression after "else".)");
|
||||
}
|
||||
|
||||
return operation;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user