You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-05 12:10:55 +00:00
Fix GDScript parser sometimes crashing when issuing warning for unreachable pattern
This commit is contained in:
@@ -1829,7 +1829,7 @@ GDScriptParser::MatchNode *GDScriptParser::parse_match() {
|
||||
}
|
||||
|
||||
#ifdef DEBUG_ENABLED
|
||||
if (have_wildcard_without_continue) {
|
||||
if (have_wildcard_without_continue && !branch->patterns.is_empty()) {
|
||||
push_warning(branch->patterns[0], GDScriptWarning::UNREACHABLE_PATTERN);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user