diff options
author | MinusKube <minuskube@gmail.com> | 2022-07-01 02:05:00 +0200 |
---|---|---|
committer | MinusKube <minuskube@gmail.com> | 2022-07-01 02:05:00 +0200 |
commit | 92367bad4e6ca204eeea2ca41277a3e4df4b5567 (patch) | |
tree | 71cf3a6936d4e680010fb915bb26b08406e2053d | |
parent | afdae67cc381bb340da2e864279da6b836804b7f (diff) |
Fix GDScript parser sometimes crashing when issuing warning for unreachable pattern
-rw-r--r-- | modules/gdscript/gdscript_parser.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/gdscript/gdscript_parser.cpp b/modules/gdscript/gdscript_parser.cpp index ca430b0f72..b8670f00d0 100644 --- a/modules/gdscript/gdscript_parser.cpp +++ b/modules/gdscript/gdscript_parser.cpp @@ -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); } |