mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-13 08:35:20 +02:00
Fix some reference counters (memleak) (#8981)
Fix some reference counters (memleak) Map::dispatchEvent: Allocation safety using references
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user