Merge pull request #22155 from LittleWhite-tb/21718-font-leak

Clear textures before setting new textures
This commit is contained in:
Rémi Verschelde 2018-09-20 21:46:38 +02:00 committed by GitHub
commit db2d999ea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -178,6 +178,7 @@ PoolVector<int> BitmapFont::_get_kernings() const {
void BitmapFont::_set_textures(const Vector<Variant> &p_textures) {
textures.clear();
for (int i = 0; i < p_textures.size(); i++) {
Ref<Texture> tex = p_textures[i];
ERR_CONTINUE(!tex.is_valid());