Fix crash during code editor folding and LSP

This commit is contained in:
Robert Wallis 2024-05-23 19:54:35 -07:00
parent b7feebefab
commit 0e97e1bc62
1 changed files with 1 additions and 1 deletions

View File

@ -3050,7 +3050,7 @@ void CodeEdit::_update_delimiter_cache(int p_from_line, int p_to_line) {
}
int CodeEdit::_is_in_delimiter(int p_line, int p_column, DelimiterType p_type) const {
if (delimiters.size() == 0) {
if (delimiters.size() == 0 || p_line >= delimiter_cache.size()) {
return -1;
}
ERR_FAIL_INDEX_V(p_line, get_line_count(), 0);