From 697a7bbee327901ddff22369b89c8d752ef7e8d7 Mon Sep 17 00:00:00 2001 From: Arthur Date: Fri, 1 Dec 2023 10:12:22 +0800 Subject: [PATCH] FIX: crash when support type and style are inconsistent jira: STUDIO-5428 Change-Id: Ib1e79c71736810099e15282c30524e55e8f60f34 (cherry picked from commit aefb7fbaf25146c03bd2eb336f58ed2eb0e83ea6) --- src/libslic3r/Support/SupportMaterial.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/libslic3r/Support/SupportMaterial.cpp b/src/libslic3r/Support/SupportMaterial.cpp index c63eb36da..8f9b1e13e 100644 --- a/src/libslic3r/Support/SupportMaterial.cpp +++ b/src/libslic3r/Support/SupportMaterial.cpp @@ -676,6 +676,8 @@ public: m_support_material_closing_radius(params.support_closing_radius) { if (m_style == smsDefault) m_style = smsGrid; + if (std::set{smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsTreeOrganic}.count(m_style)) + m_style = smsGrid; switch (m_style) { case smsGrid: { @@ -772,7 +774,8 @@ public: case smsTreeHybrid: case smsTreeOrganic: assert(false); - [[fallthrough]]; + //[[fallthrough]]; + return Polygons(); case smsGrid: { #ifdef SUPPORT_USE_AGG_RASTERIZER