浏览代码

Clear textures before setting new textures (#21718)

Alexandre LittleWhite Laurent 7 年之前
父节点
当前提交
3aa82c524f
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/resources/font.cpp

+ 1 - 0
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());