Merge pull request #34298 from timothyqiu/lines-32736

Fixes crash after remove_line in RichTextLabel
This commit is contained in:
Rémi Verschelde 2019-12-12 12:15:55 +01:00 committed by GitHub
commit ee11b0eda7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1701,6 +1701,9 @@ bool RichTextLabel::remove_line(const int p_line) {
if (!was_newline) { if (!was_newline) {
current_frame->lines.remove(p_line); current_frame->lines.remove(p_line);
if (current_frame->lines.size() == 0) {
current_frame->lines.resize(1);
}
} }
if (p_line == 0 && current->subitems.size() > 0) if (p_line == 0 && current->subitems.size() > 0)