mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-02 07:10:37 +08:00
Fix SPE-2638: do not acess opl->colors when mesh_info != Color (#13859)
This commit is contained in:
parent
c540bda309
commit
ff683ec017
@ -1363,8 +1363,10 @@ static void chain_open_polylines_close_gaps(std::vector<OpenPolyline>
|
|||||||
opl->points.pop_back();
|
opl->points.pop_back();
|
||||||
} else {
|
} else {
|
||||||
// The end points are different, keep both of them.
|
// The end points are different, keep both of them.
|
||||||
|
if constexpr (mesh_info == AdditionalMeshInfo::Color) {
|
||||||
midpoint_inserted = handle_color_at_gap_between_open_polylines<mesh_info>(*opl, opl->points.front(), opl->colors.front());
|
midpoint_inserted = handle_color_at_gap_between_open_polylines<mesh_info>(*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.
|
// When we split the gap into two pieces by adding a midpoint, then a valid polygon has at least 4 points.
|
||||||
if (opl->points.size() >= (3 + size_t(midpoint_inserted))) {
|
if (opl->points.size() >= (3 + size_t(midpoint_inserted))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user