diff options
author | SmallJoker <SmallJoker@users.noreply.github.com> | 2019-09-24 19:05:28 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-24 19:05:28 +0200 |
commit | 26b39f1eae1f576669cbf49c6db94ef4ed8624df (patch) | |
tree | dd0a508d4d6987f2c667cbf342955f64ebbd02af /src/client | |
parent | d77ea764768f5cde9e8f0781356a67d723aa7609 (diff) | |
download | minetest-26b39f1eae1f576669cbf49c6db94ef4ed8624df.tar.gz minetest-26b39f1eae1f576669cbf49c6db94ef4ed8624df.tar.bz2 minetest-26b39f1eae1f576669cbf49c6db94ef4ed8624df.zip |
Fix some reference counters (memleak) (#8981)
Fix some reference counters (memleak)
Map::dispatchEvent: Allocation safety using references
Diffstat (limited to 'src/client')
-rw-r--r-- | src/client/fontengine.cpp | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/client/fontengine.cpp b/src/client/fontengine.cpp index c32d0f1a4..858d6780e 100644 --- a/src/client/fontengine.cpp +++ b/src/client/fontengine.cpp @@ -275,7 +275,6 @@ void FontEngine::initFont(unsigned int basesize, FontMode mode) font_shadow_alpha); if (font) { - font->grab(); m_font_cache[mode][basesize] = font; return; } @@ -365,8 +364,6 @@ void FontEngine::initSimpleFont(unsigned int basesize, FontMode mode) } } - if (font) { - font->grab(); + if (font) m_font_cache[mode][basesize] = font; - } } |