commit aa367ce9d1e2cf578a66d1afd899b8b58ccd7702
parent 571d5a83863331d6d781157d93bb68a7d9c9691e
Author: Christophe Coustet <christophe.coustet@meso-star.com>
Date: Mon, 20 Feb 2023 16:58:11 +0100
Fix detection of polygon simplification
Diffstat:
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/scpr_polygon.c b/src/scpr_polygon.c
@@ -216,8 +216,9 @@ scpr_polygon_setup_indexed_vertices
/* Merge vertices, ... */
TRY(paths = Clipper2Lib::SimplifyPaths(paths, dev->inv_scale));
polygon->paths = std::move(paths);
+ paths.Clipper2Lib::Paths64::~Paths64();
changedc = (ncomponents != polygon->paths.size());
- for(c = 0; !changedv && c < paths.size(); c++) {
+ for(c = 0; !changedv && c < polygon->paths.size(); c++) {
size_t nv;
get_nverts(c, &nv, data);
changedv |= (nv != polygon->paths[c].size());