diff --git a/src/libslic3r/PerimeterGenerator.cpp b/src/libslic3r/PerimeterGenerator.cpp index 34d8bd28d7..e31f043284 100644 --- a/src/libslic3r/PerimeterGenerator.cpp +++ b/src/libslic3r/PerimeterGenerator.cpp @@ -405,6 +405,7 @@ static ExtrusionEntityCollection traverse_loops(const PerimeterGenerator &perime // Reapply the nearest point search for starting point. // We allow polyline reversal because Clipper may have randomly reversed polylines during clipping. + if(paths.empty()) continue; chain_and_reorder_extrusion_paths(paths, &paths.front().first_point()); // smothing the overhang degree // merge small path between paths which have same overhang degree diff --git a/src/libslic3r/ShortestPath.cpp b/src/libslic3r/ShortestPath.cpp index 56b1234c18..a2a2680f52 100644 --- a/src/libslic3r/ShortestPath.cpp +++ b/src/libslic3r/ShortestPath.cpp @@ -1042,6 +1042,7 @@ std::vector> chain_extrusion_paths(std::vector &extrusion_paths, const std::vector> &chain) { assert(extrusion_paths.size() == chain.size()); + if(extrusion_paths.empty()) return; std::vector out; out.reserve(extrusion_paths.size()); for (const std::pair &idx : chain) {