summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorSmallJoker <SmallJoker@users.noreply.github.com>2019-09-24 19:05:28 +0200
committerGitHub <noreply@github.com>2019-09-24 19:05:28 +0200
commit26b39f1eae1f576669cbf49c6db94ef4ed8624df (patch)
treedd0a508d4d6987f2c667cbf342955f64ebbd02af /src/client
parentd77ea764768f5cde9e8f0781356a67d723aa7609 (diff)
downloadminetest-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.cpp5
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;
- }
}