浏览代码

Fix memory leak in Xatlas module

(cherry picked from commit e57b8d79eca74b908220efa8a8331868f950cea1)
Rafał Mikrut 4 年之前
父节点
当前提交
54b6a7b8b7
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      modules/xatlas_unwrap/register_types.cpp

+ 1 - 0
modules/xatlas_unwrap/register_types.cpp

@@ -78,6 +78,7 @@ bool xatlas_mesh_lightmap_unwrap_callback(float p_texel_size, const float *p_ver
 	float h = *r_size_hint_y;
 
 	if (w == 0 || h == 0) {
+		xatlas::Destroy(atlas);
 		return false; //could not bake because there is no area
 	}