FIX: crash when support type and style are inconsistent

jira: STUDIO-5428
Change-Id: Ib1e79c71736810099e15282c30524e55e8f60f34
(cherry picked from commit aefb7fbaf25146c03bd2eb336f58ed2eb0e83ea6)
This commit is contained in:
Arthur 2023-12-01 10:12:22 +08:00 committed by Lane.Wei
parent 91036d0b28
commit 697a7bbee3
1 changed files with 4 additions and 1 deletions

View File

@ -676,6 +676,8 @@ public:
m_support_material_closing_radius(params.support_closing_radius) m_support_material_closing_radius(params.support_closing_radius)
{ {
if (m_style == smsDefault) m_style = smsGrid; if (m_style == smsDefault) m_style = smsGrid;
if (std::set<SupportMaterialStyle>{smsTreeSlim, smsTreeStrong, smsTreeHybrid, smsTreeOrganic}.count(m_style))
m_style = smsGrid;
switch (m_style) { switch (m_style) {
case smsGrid: case smsGrid:
{ {
@ -772,7 +774,8 @@ public:
case smsTreeHybrid: case smsTreeHybrid:
case smsTreeOrganic: case smsTreeOrganic:
assert(false); assert(false);
[[fallthrough]]; //[[fallthrough]];
return Polygons();
case smsGrid: case smsGrid:
{ {
#ifdef SUPPORT_USE_AGG_RASTERIZER #ifdef SUPPORT_USE_AGG_RASTERIZER