summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2019-06-11 16:00:03 +0200
committerGitHub <noreply@github.com>2019-06-11 16:00:03 +0200
commit15425b450f6c531271be637aecd7fe3cb7d314ba (patch)
treec40c5912596f897039f72183c265bc0a80348088 /scene
parent0d5b2dba918b91b88ace4ae61fb7866c7d58bf4b (diff)
parent685451967c1dfe7b8820b74e53ad562a811be1d2 (diff)
Merge pull request #29573 from qarmin/fix_rich_text_process_line
Fix RichLabelText::_process_line crash
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/rich_text_label.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index da452e3f10..c6b6d29384 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -592,7 +592,7 @@ int RichTextLabel::_process_line(ItemFrame *p_frame, const Vector2 &p_ofs, int &
//assign actual widths
for (int i = 0; i < table->columns.size(); i++) {
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->total_width += table->columns[i].width + hseparation;
}