From 22195b3bd71dd5bbe559648ddc3302dd0b9b5e67 Mon Sep 17 00:00:00 2001 From: Pshemek Date: Thu, 4 Apr 2019 07:49:41 +0000 Subject: [PATCH] Bugfix for segefault on zero support meterial generation --- xs/src/libslic3r/SupportMaterial.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xs/src/libslic3r/SupportMaterial.cpp b/xs/src/libslic3r/SupportMaterial.cpp index 556873297..19dd54edf 100644 --- a/xs/src/libslic3r/SupportMaterial.cpp +++ b/xs/src/libslic3r/SupportMaterial.cpp @@ -69,6 +69,10 @@ SupportMaterial::generate(PrintObject *object) map &contact = contact_overhang.first; map &overhang = contact_overhang.second; + //bugfix: do not try to generate overhang if there is no contact area + if( contact.empty() ) + return; + // Determine the top surfaces of the object. We need these to determine // the layer heights of support material and to clip support to the object // silhouette.