From 8a8d2d15b04a934be60f306845f75aa86d6e51d4 Mon Sep 17 00:00:00 2001 From: YuSanka Date: Mon, 4 Apr 2022 11:42:10 +0200 Subject: [PATCH] Fix for #8156 - Automatic color change for logo crashes PrusaSlicer with second object of 0.2mm height --- src/slic3r/GUI/DoubleSlider.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/DoubleSlider.cpp b/src/slic3r/GUI/DoubleSlider.cpp index 3d914d5b6..ce3309967 100644 --- a/src/slic3r/GUI/DoubleSlider.cpp +++ b/src/slic3r/GUI/DoubleSlider.cpp @@ -2096,7 +2096,8 @@ void Control::auto_color_change() const Print& print = GUI::wxGetApp().plater()->fff_print(); for (auto object : print.objects()) { - if (object->layer_count() == 0) + // An object should to have at least 2 layers to apply an auto color change + if (object->layer_count() < 2) continue; check_color_change(object, 1, object->layers().size(), false, [this, extruders_cnt](Layer* layer)