Merge pull request #52706 from vnen/gdscript-ternary-operator-crash

GDScript: Show error when missing expression after ternary else
This commit is contained in:
Rémi Verschelde authored and GitHub committed 2021-09-15 17:20:52 +02:00
commit a4187c9235
3 files changed
+10

No files matched your search

+4
View File
@@ -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;
}