diff options
Diffstat (limited to 'scene/gui/rich_text_label.cpp')
-rw-r--r-- | scene/gui/rich_text_label.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index b6dd953d50..4f25fed335 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -5650,10 +5650,15 @@ void RichTextLabel::set_text(const String &p_bbcode) { } void RichTextLabel::_apply_translation() { + // If `text` is empty, it could mean that the tag stack is being used instead. Leave it be. + if (text.is_empty()) { + return; + } + String xl_text = atr(text); if (use_bbcode) { parse_bbcode(xl_text); - } else { // raw text + } else { // Raw text. clear(); add_text(xl_text); } |