From 3848a8eda23d532cdbe4b226e6f4a0aecc528c35 Mon Sep 17 00:00:00 2001 From: Vojtech Bubnik Date: Wed, 10 May 2023 09:02:40 +0200 Subject: [PATCH] Fixed crash after 'vb_organic_interfaces' with zero top interfaces. --- src/libslic3r/Support/TreeSupport.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libslic3r/Support/TreeSupport.cpp b/src/libslic3r/Support/TreeSupport.cpp index 0eb009c77..d53b3e785 100644 --- a/src/libslic3r/Support/TreeSupport.cpp +++ b/src/libslic3r/Support/TreeSupport.cpp @@ -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())