commit 943c920a4287aaca0e1c9d20d75f8592d2a4bebf
parent 623adb4529b52adf51baefd8377e70f307dcbdd9
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Mon, 26 Feb 2024 10:49:31 +0100
Move some release code to easy debugging.
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/cg_construction_mode_1.c b/src/cg_construction_mode_1.c
@@ -892,15 +892,15 @@ build_windows
ERR(str_printf(&name, "adj_intersect_%lu", (long unsigned)i));
ERR(scad_intersect_geometries(str_cget(&name), &detect, 1, adj_list,
adjoining_n, &hole_adjoining_intersect));
- ERR(scad_geometry_ref_put(detect));
- detect = NULL;
ERR(scad_geometry_get_count(hole_adjoining_intersect, &count));
- ERR(scad_geometry_ref_put(hole_adjoining_intersect));
- hole_adjoining_intersect = NULL;
if(count) {
removed = 1;
removed_windows_adj++;
}
+ ERR(scad_geometry_ref_put(hole_adjoining_intersect));
+ hole_adjoining_intersect = NULL;
+ ERR(scad_geometry_ref_put(detect));
+ detect = NULL;
}
/* Check if the window intersects an unexpected wall of the building:
@@ -923,15 +923,15 @@ build_windows
ERR(str_printf(&name, "self_intersect_%lu", (long unsigned)i));
ERR(scad_intersect_geometries(str_cget(&name), &benv, 1, &detect, 1,
&problem));
- ERR(scad_geometry_ref_put(detect));
- detect = NULL;
ERR(scad_geometry_get_count(problem, &count));
- ERR(scad_geometry_ref_put(problem));
- problem = NULL;
if(count != 1) {
removed = 1;
removed_windows_self++;
}
+ ERR(scad_geometry_ref_put(detect));
+ detect = NULL;
+ ERR(scad_geometry_ref_put(problem));
+ problem = NULL;
}
if(!removed) {