From 54b6a7b8b7b58ec93744f9050d8500eef8606cea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mikrut?= Date: Sun, 14 Feb 2021 11:59:57 +0100 Subject: [PATCH] Fix memory leak in Xatlas module (cherry picked from commit e57b8d79eca74b908220efa8a8331868f950cea1) --- modules/xatlas_unwrap/register_types.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp index 72026a2a411..d198acf92d7 100644 --- a/modules/xatlas_unwrap/register_types.cpp +++ b/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 }