commit cd080f8aad9d31b60e0e71e0f9c2f7b901e7848b
parent 8ade70a0d0b788ca2fe0fb73240a629039c3faf8
Author: Benjamin Piaud <benjamin.piaud@meso-star.com>
Date: Wed, 18 Jan 2023 11:26:01 +0100
Merge remote-tracking branch 'refs/remotes/origin/develop' into develop
Diffstat:
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/cg_city.c b/src/cg_city.c
@@ -140,7 +140,7 @@ release_city(struct city* city)
/* iterate on building */
for (i = 0; i < city->buildings_count; i++) {
struct building* building = city->buildings + i;
- SCPR(polygon_ref_put(building->pg));
+ if(building->pg) SCPR(polygon_ref_put(building->pg));
if(building->name_initialized) str_release(&building->name);
}
diff --git a/src/cg_construction_mode_1.c b/src/cg_construction_mode_1.c
@@ -120,8 +120,7 @@ build_wall
offset = e_insulation;
ERR(scpr_polygon_create_copy(NULL, pg, &pg_ext));
- /* TODO : temporary bugfix to deal with zero-offset*/
- if (offset != 0) {ERR(scpr_offset_polygon(pg_ext, -offset, SCPR_JOIN_MITER));}
+ ERR(scpr_offset_polygon(pg_ext, -offset, SCPR_JOIN_MITER));
offset = e_wall + e_insulation;
ERR(scpr_polygon_create_copy(NULL, pg, &pg_int));