Fixed crash after 'vb_organic_interfaces' with zero top interfaces.

This commit is contained in:
Vojtech Bubnik 2023-05-10 09:02:40 +02:00
parent c9f449bcb2
commit 3848a8eda2

View File

@ -4558,7 +4558,7 @@ static void draw_branches(
}
// Subtract top contact layer polygons from support base.
SupportGeneratorLayer *top_contact_layer = top_contacts[layer_idx];
SupportGeneratorLayer *top_contact_layer = top_contacts.empty() ? nullptr : top_contacts[layer_idx];
if (top_contact_layer && ! top_contact_layer->polygons.empty() && ! base_layer_polygons.empty()) {
base_layer_polygons = diff(base_layer_polygons, top_contact_layer->polygons);
if (! bottom_contact_polygons.empty())