From dbaa0f72d186a8fb5dd72055cacf7ed581cfa743 Mon Sep 17 00:00:00 2001 From: Pavel Mikus Date: Mon, 2 Jan 2023 10:51:57 +0100 Subject: [PATCH] fix crash in malformations estimation - the nearest line of the current support extrusion may not be in the previous layer lines for some reason (maybe per object ordering?) --- src/libslic3r/SupportSpotsGenerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/SupportSpotsGenerator.cpp b/src/libslic3r/SupportSpotsGenerator.cpp index cb8d0f5d6..023c3b50e 100644 --- a/src/libslic3r/SupportSpotsGenerator.cpp +++ b/src/libslic3r/SupportSpotsGenerator.cpp @@ -905,7 +905,7 @@ void estimate_supports_malformations(SupportLayerPtrs &layers, float flow_width, ExtrusionLine line_out{i > 0 ? annotated_points[i - 1].position.cast() : curr_point.position.cast(), curr_point.position.cast(), line_len, extrusion}; - const ExtrusionLine nearest_prev_layer_line = prev_layer_lines.get_lines().size() > 0 ? + const ExtrusionLine nearest_prev_layer_line = prev_layer_lines.get_lines().size() > curr_point.nearest_prev_layer_line ? prev_layer_lines.get_line(curr_point.nearest_prev_layer_line) : ExtrusionLine{};