You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-15 13:51:40 +00:00
fix editor crash when missing variable in pattern match dispatch
This commit is contained in:
@@ -1906,7 +1906,8 @@ GDParser::PatternNode *GDParser::_parse_pattern(bool p_static) {
|
|||||||
// all the constants like strings and numbers
|
// all the constants like strings and numbers
|
||||||
default: {
|
default: {
|
||||||
Node *value = _parse_and_reduce_expression(pattern, p_static);
|
Node *value = _parse_and_reduce_expression(pattern, p_static);
|
||||||
if (error_set) {
|
if (!value) {
|
||||||
|
_set_error("Expect constant expression or variables in a pattern");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user