Merge pull request #68325 from pfertyk/issue-68242-rich-text-label-crash
Fix RichTextLabel crash with out of bound exception
This commit is contained in:
commit
dac2d8fb42
1 changed files with 1 additions and 1 deletions
|
@ -2375,7 +2375,7 @@ int RichTextLabel::_find_list(Item *p_item, Vector<int> &r_index, Vector<ItemLis
|
|||
|
||||
int index = 1;
|
||||
if (frame != nullptr) {
|
||||
for (int i = list->line + 1; i <= prev_item->line; i++) {
|
||||
for (int i = list->line + 1; i <= prev_item->line && i < (int)frame->lines.size(); i++) {
|
||||
if (_find_list_item(frame->lines[i].from) == list) {
|
||||
index++;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue