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{};