diff --git a/src/libslic3r/TriangleMeshSlicer.cpp b/src/libslic3r/TriangleMeshSlicer.cpp index d52d126e7f..ecb9c821fd 100644 --- a/src/libslic3r/TriangleMeshSlicer.cpp +++ b/src/libslic3r/TriangleMeshSlicer.cpp @@ -1363,7 +1363,9 @@ static void chain_open_polylines_close_gaps(std::vector opl->points.pop_back(); } else { // The end points are different, keep both of them. - midpoint_inserted = handle_color_at_gap_between_open_polylines(*opl, opl->points.front(), opl->colors.front()); + if constexpr (mesh_info == AdditionalMeshInfo::Color) { + midpoint_inserted = handle_color_at_gap_between_open_polylines(*opl, opl->points.front(), opl->colors.front()); + } } // When we split the gap into two pieces by adding a midpoint, then a valid polygon has at least 4 points.