mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-29 19:32:40 +08:00
Fix segfault in ensuring regularization - wrong check for unbounded access
This commit is contained in:
parent
b5514120e5
commit
b1081d7ac3
@ -1509,7 +1509,9 @@ void PrintObject::discover_vertical_shells()
|
||||
Polygons internal_volume;
|
||||
{
|
||||
Polygons shrinked_bottom_slice = idx_layer > 0 ? to_polygons(m_layers[idx_layer - 1]->lslices) : Polygons{};
|
||||
Polygons shrinked_upper_slice = idx_layer > 0 ? to_polygons(m_layers[idx_layer + 1]->lslices) : Polygons{};
|
||||
Polygons shrinked_upper_slice = (idx_layer + 1) < m_layers.size() ?
|
||||
to_polygons(m_layers[idx_layer + 1]->lslices) :
|
||||
Polygons{};
|
||||
internal_volume = intersection(shrinked_bottom_slice, shrinked_upper_slice);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user