Skip to content

Commit

Permalink
Fix crash in multi-material segmentation when there wasn't any input …
Browse files Browse the repository at this point in the history
…polygon for some layer.
  • Loading branch information
hejllukas committed Dec 20, 2024
1 parent 4f5bd3f commit 5c7888b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/libslic3r/MultiMaterialSegmentation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,9 @@ std::vector<std::vector<ExPolygons>> segmentation_by_painting(const PrintObject
throw_on_cancel_callback();

std::vector<ColorProjectionLines> &input_polygons_projection_lines = input_polygons_projection_lines_layers[layer_idx];
if (input_polygons_projection_lines.empty()) {
continue;
}

if constexpr (MM_SEGMENTATION_DEBUG_COLOR_RANGES) {
export_color_projection_lines_color_ranges_to_svg(debug_out_path("mm-color-ranges-%d.svg", layer_idx), input_polygons_projection_lines, input_expolygons[layer_idx]);
Expand Down

0 comments on commit 5c7888b

Please sign in to comment.