diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index b07db889c..f19185f9e 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -1709,7 +1709,9 @@ namespace Skirt { //FIXME infinite or high skirt does not make sense for sequential print! (skirt_done.size() < (size_t)print.config().skirt_height.value || print.has_infinite_skirt()) && // This print_z has not been extruded yet (sequential print) - skirt_done.back() < layer_tools.print_z - EPSILON && + // FIXME: The skirt_done should not be empty at this point. The check is a workaround + // of https://github.com/prusa3d/PrusaSlicer/issues/5652, but it deserves a real fix. + (! skirt_done.empty() && skirt_done.back() < layer_tools.print_z - EPSILON) && // and this layer is an object layer, or it is a raft layer. (layer_tools.has_object || support_layer->id() < (size_t)support_layer->object()->config().raft_layers.value)) { #if 0