diff options
author | Alexandre LittleWhite Laurent <lw.demoscene@googlemail.com> | 2018-09-16 16:49:46 +0200 |
---|---|---|
committer | Alexandre LittleWhite Laurent <lw.demoscene@googlemail.com> | 2018-09-17 20:52:45 +0200 |
commit | 3aa82c524f037305d8d90b45956c315268f43741 (patch) | |
tree | f5091267200ea22278218559eb32de6a7f78f9d2 | |
parent | a4e4dd396665a29dac63339930a97852bb8cd449 (diff) |
Clear textures before setting new textures (#21718)
-rw-r--r-- | scene/resources/font.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 50bf8f38f7..b78b3a6ffb 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -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()); |