Fix RichLabelText::_process_line crash

This commit is contained in:
qarmin 2019-06-07 12:36:11 +02:00
parent 197b65f32a
commit 685451967c
1 changed files with 1 additions and 1 deletions

View File

@ -592,7 +592,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
//assign actual widths //assign actual widths
for (int i = 0; i < table->columns.size(); i++) { for (int i = 0; i < table->columns.size(); i++) {
table->columns.write[i].width = table->columns[i].min_width; table->columns.write[i].width = table->columns[i].min_width;
if (table->columns[i].expand) if (table->columns[i].expand && total_ratio > 0)
table->columns.write[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio; table->columns.write[i].width += table->columns[i].expand_ratio * remaining_width / total_ratio;
table->total_width += table->columns[i].width + hseparation; table->total_width += table->columns[i].width + hseparation;
} }