소스 검색

Merge pull request #46009 from qarmin/xatlas_leak

Fix memory leak in Xatlas module
Rémi Verschelde 4 년 전
부모
커밋
4eae532921
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1 0
      modules/xatlas_unwrap/register_types.cpp

+ 1 - 0
modules/xatlas_unwrap/register_types.cpp

@@ -154,6 +154,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
 	}