summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorRafał Mikrut <mikrutrafal@protonmail.com>2021-02-14 11:59:57 +0100
committerRafał Mikrut <mikrutrafal@protonmail.com>2021-02-14 11:59:57 +0100
commite57b8d79eca74b908220efa8a8331868f950cea1 (patch)
treefb5e33940b94ea43f360e08687c2da71ede79515 /modules
parent041cccc28773fe2d832a90888416df106f2a6d79 (diff)
Fix memory leak in Xatlas module
Diffstat (limited to 'modules')
-rw-r--r--modules/xatlas_unwrap/register_types.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/xatlas_unwrap/register_types.cpp b/modules/xatlas_unwrap/register_types.cpp
index 880fe2df61..fb4df10904 100644
--- a/modules/xatlas_unwrap/register_types.cpp
+++ b/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
}