diff options
author | LeaoLuciano <lucianorsleao@gmail.com> | 2021-10-28 07:51:48 -0300 |
---|---|---|
committer | LeaoLuciano <lucianorsleao@gmail.com> | 2021-10-28 07:51:48 -0300 |
commit | f21b5e4d2fb53e692988e01bf4f5b4957dd9422c (patch) | |
tree | 84e5c8604348a4eb225baafaa506d57b59786cea | |
parent | 6d930bd270618aba2445e916e55dc3477cbb6f6c (diff) |
Fix memory leak in RichTextLabel.remove_line
-rw-r--r-- | scene/gui/rich_text_label.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp index f1efbbda98..ddcc5407dc 100644 --- a/scene/gui/rich_text_label.cpp +++ b/scene/gui/rich_text_label.cpp @@ -2346,6 +2346,7 @@ void RichTextLabel::_remove_item(Item *p_item, const int p_line, const int p_sub // Then remove the provided item itself. p_item->parent->subitems.erase(p_item); } + memdelete(p_item); } void RichTextLabel::add_image(const Ref<Texture2D> &p_image, const int p_width, const int p_height, const Color &p_color, InlineAlign p_align) { |