Fix RichTextLabel crash with out of bound exception
Fixes #68242.
(cherry picked from commit 44592c8c19
)
This commit is contained in:
parent
755a86f502
commit
41f4068a6e
@ -2375,7 +2375,7 @@ int RichTextLabel::_find_list(Item *p_item, Vector<int> &r_index, Vector<ItemLis
|
|||||||
|
|
||||||
int index = 1;
|
int index = 1;
|
||||||
if (frame != nullptr) {
|
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) {
|
if (_find_list_item(frame->lines[i].from) == list) {
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user