Fix memory leak in Xatlas module

(cherry picked from commit e57b8d79ec)
This commit is contained in:
Rafał Mikrut 2021-02-14 11:59:57 +01:00 committed by Rémi Verschelde
parent 5a290e0a3c
commit 54b6a7b8b7
No known key found for this signature in database
GPG key ID: C3336907360768E1

View file

@ -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
}