diff --git a/src/geom.cpp b/src/geom.cpp index be063c3f..5d135e72 100644 --- a/src/geom.cpp +++ b/src/geom.cpp @@ -250,6 +250,7 @@ void union_many(std::vector &to_unify) { // whose bboxes intersect (transitivity is handled by union-find) bgi::rtree> rtree; for (size_t i = 0; i < to_unify.size(); i++) { + if (boost::geometry::is_empty(to_unify[i])) continue; for (auto const &v : rtree | bgi::adaptors::queried(bgi::intersects(boxes[i]))) { size_t ri = find(i), rj = find(v.second); if (ri != rj) parent[ri] = rj;