From 6169b4fa2a4fc94cf81a2d44ca3d403f817edb98 Mon Sep 17 00:00:00 2001 From: Noisyfox Date: Thu, 24 Oct 2024 21:27:46 +0800 Subject: [PATCH] Fix issue when the extruder do not have any adjustable extrusion --- src/libslic3r/GCode/CoolingBuffer.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode/CoolingBuffer.cpp b/src/libslic3r/GCode/CoolingBuffer.cpp index e88f3b38f..c83d854ee 100644 --- a/src/libslic3r/GCode/CoolingBuffer.cpp +++ b/src/libslic3r/GCode/CoolingBuffer.cpp @@ -555,8 +555,7 @@ static inline void extruder_range_slow_down_non_proportional( for (PerExtruderAdjustments *adj : by_min_print_speed) { adj->idx_line_begin = 0; adj->idx_line_end = 0; - assert(adj->idx_line_begin < adj->n_lines_adjustable); - if (adj->lines[adj->idx_line_begin].feedrate > feedrate) + if (adj->idx_line_begin < adj->n_lines_adjustable && adj->lines[adj->idx_line_begin].feedrate> feedrate) feedrate = adj->lines[adj->idx_line_begin].feedrate; } assert(feedrate > 0.f); @@ -643,6 +642,7 @@ float CoolingBuffer::calculate_layer_slowdown(std::vectorslow_down_layer_time < adj2->slow_down_layer_time; });