Fix crash in hull() with empty CGAL child geometry (fixes #990).

master
Torsten Paul 2014-10-21 20:11:19 +02:00
parent 346fc3622b
commit 7ad0a86b02
1 changed files with 4 additions and 2 deletions

View File

@ -365,8 +365,10 @@ namespace CGALUtils {
const shared_ptr<const Geometry> &chgeom = item.second;
const CGAL_Nef_polyhedron *N = dynamic_cast<const CGAL_Nef_polyhedron *>(chgeom.get());
if (N) {
for (CGAL_Nef_polyhedron3::Vertex_const_iterator i = N->p3->vertices_begin(); i != N->p3->vertices_end(); ++i) {
points.insert(K::Point_3(to_double(i->point()[0]),to_double(i->point()[1]),to_double(i->point()[2])));
if (!N->isEmpty()) {
for (CGAL_Nef_polyhedron3::Vertex_const_iterator i = N->p3->vertices_begin(); i != N->p3->vertices_end(); ++i) {
points.insert(K::Point_3(to_double(i->point()[0]),to_double(i->point()[1]),to_double(i->point()[2])));
}
}
} else {
const PolySet *ps = dynamic_cast<const PolySet *>(chgeom.get());