Skip to content

Commit

Permalink
solidtest: Fix segfault in setExteriorShell test
Browse files Browse the repository at this point in the history
For the pointer version, The `Polyhedralsurface` takes ownership of
the shell.

This fixes commit 481cce2.
  • Loading branch information
ptitjano committed Oct 25, 2024
1 parent f29b0d6 commit 037f549
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion test/unit/SFCGAL/SolidTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "SFCGAL/Kernel.h"

#include "SFCGAL/Solid.h"
#include "SFCGAL/PolyhedralSurface.h"
#include "SFCGAL/TriangulatedSurface.h"
#include "SFCGAL/io/wkt.h"
#include "SFCGAL/algorithm/covers.h"
Expand Down Expand Up @@ -130,7 +131,7 @@ BOOST_AUTO_TEST_CASE(solidSetExteriorRingTest)
BOOST_CHECK(!shell1->isEmpty());
BOOST_CHECK(solid->isEmpty());

solid->setExteriorShell(shell1);
solid->setExteriorShell(shell1->as<PolyhedralSurface>());
BOOST_CHECK_EQUAL(solid->numShells(), 1);
BOOST_CHECK(!solid->isEmpty());
BOOST_CHECK(algorithm::covers3D(solid->exteriorShell(), *shell1));
Expand Down

0 comments on commit 037f549

Please sign in to comment.