Skip to content

Commit

Permalink
Merge pull request #45255 from qarmin/fix_leak_dynamic_font
Browse files Browse the repository at this point in the history
[3.2] Fix memory when loading dynamic font
  • Loading branch information
akien-mga authored Jan 17, 2021
2 parents 694e51d + f92ad30 commit e25984a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions scene/resources/dynamic_font.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ Error DynamicFontAtSize::_load() {
f->get_buffer(font->_fontdata.ptrw(), len);
font->set_font_ptr(font->_fontdata.ptr(), len);
f->close();
memdelete(f);
}

if (font->font_mem) {
Expand Down

0 comments on commit e25984a

Please sign in to comment.