From 3aa82c524f037305d8d90b45956c315268f43741 Mon Sep 17 00:00:00 2001 From: Alexandre LittleWhite Laurent Date: Sun, 16 Sep 2018 16:49:46 +0200 Subject: [PATCH] Clear textures before setting new textures (#21718) --- scene/resources/font.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/scene/resources/font.cpp b/scene/resources/font.cpp index 50bf8f38f7b..b78b3a6ffbe 100644 --- a/scene/resources/font.cpp +++ b/scene/resources/font.cpp @@ -178,6 +178,7 @@ PoolVector BitmapFont::_get_kernings() const { void BitmapFont::_set_textures(const Vector &p_textures) { + textures.clear(); for (int i = 0; i < p_textures.size(); i++) { Ref tex = p_textures[i]; ERR_CONTINUE(!tex.is_valid());