mirror of https://github.com/axmolengine/axmol.git
Merge pull request #17756 from perminovVS/set-font-atlas-memory-leak
Memory leak in setFontAtlas, if set equal font in Label.
This commit is contained in:
commit
5c3993836e
|
@ -584,6 +584,10 @@ void Label::setFontAtlas(FontAtlas* atlas,bool distanceFieldEnabled /* = false *
|
|||
|
||||
if (atlas == _fontAtlas)
|
||||
{
|
||||
if (_fontAtlas)
|
||||
{
|
||||
FontAtlasCache::releaseFontAtlas(_fontAtlas);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue