From 27c13f8cda1a39c911c7913bbefe2f37425fc205 Mon Sep 17 00:00:00 2001 From: Jean Felder Date: Fri, 25 Oct 2024 15:32:44 +0200 Subject: [PATCH] solidtest: Fix segfault in setExteriorShell test The `Polyhedralsurface` takes ownership of the shell. This fixes commit 481cce229ba36d2493d413cc1e0a061eb340d95c. --- test/unit/SFCGAL/SolidTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/unit/SFCGAL/SolidTest.cpp b/test/unit/SFCGAL/SolidTest.cpp index a0dc14e3..1d542ce2 100644 --- a/test/unit/SFCGAL/SolidTest.cpp +++ b/test/unit/SFCGAL/SolidTest.cpp @@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE(solidSetExteriorRingTest) BOOST_CHECK(!shell1->isEmpty()); BOOST_CHECK(solid->isEmpty()); - solid->setExteriorShell(shell1); + solid->setExteriorShell(shell1->clone()); BOOST_CHECK_EQUAL(solid->numShells(), 1); BOOST_CHECK(!solid->isEmpty()); BOOST_CHECK(algorithm::covers3D(solid->exteriorShell(), *shell1));