Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/supermerill/SuperSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsupermerill <merill@free.fr>2021-10-20 23:06:41 +0300
committersupermerill <merill@free.fr>2021-10-22 20:59:28 +0300
commit499c2d45dfac06827cf7486e1c66b2c49280a01f (patch)
tree583651741be4cc82e4436f5285dda6fccbd0cdaf /src/libslic3r/PrintConfig.cpp
parent1f48f32a616822fb406d8fc5e36d7e825fa490a5 (diff)
Fix crash when layer_height is 0
supermerill/SuperSlicer#1664
Diffstat (limited to 'src/libslic3r/PrintConfig.cpp')
-rw-r--r--src/libslic3r/PrintConfig.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/libslic3r/PrintConfig.cpp b/src/libslic3r/PrintConfig.cpp
index 94864a683..223f409eb 100644
--- a/src/libslic3r/PrintConfig.cpp
+++ b/src/libslic3r/PrintConfig.cpp
@@ -6208,8 +6208,11 @@ std::set<const DynamicPrintConfig*> DynamicPrintConfig::update_phony(const std::
//note: width<-> spacing conversion is done via float, so max 6-7 digit of precision.
std::set<const DynamicPrintConfig*> DynamicPrintConfig::value_changed(const t_config_option_key& opt_key, const std::vector<DynamicPrintConfig*> config_collection) {
-
if (opt_key == "layer_height") {
+ const ConfigOptionFloat* layer_height_option = find_option<ConfigOptionFloat>("layer_height", this, config_collection);
+ //if bad layer height, slip to be able to go to the check part without outputing exceptions.
+ if (layer_height_option && layer_height_option->value < EPSILON)
+ return {};
if (!update_phony(config_collection).empty())
return { this };
return {};