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
path: root/xs
diff options
context:
space:
mode:
authorbubnikv <bubnikv@gmail.com>2017-12-21 21:19:07 +0300
committerbubnikv <bubnikv@gmail.com>2017-12-21 21:19:07 +0300
commit3addeb57b43a38cdf765abb2bf9147f3fdc034d0 (patch)
tree12623a6fbb6e1073d928a46d029f56a107432ee6 /xs
parent9d3ade81fa140d898a01fffac2a7ec06f022aef6 (diff)
Fix of "Program crashes when [Suppress "- default -" presets:] is DISABLED"
https://github.com/prusa3d/Slic3r/issues/643
Diffstat (limited to 'xs')
-rw-r--r--xs/src/slic3r/GUI/Preset.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/xs/src/slic3r/GUI/Preset.hpp b/xs/src/slic3r/GUI/Preset.hpp
index 1f6a90595..c1d85833b 100644
--- a/xs/src/slic3r/GUI/Preset.hpp
+++ b/xs/src/slic3r/GUI/Preset.hpp
@@ -226,7 +226,7 @@ private:
{
Preset key(m_type, name);
auto it = std::lower_bound(m_presets.begin() + 1, m_presets.end(), key);
- return (it == m_presets.end() && m_presets.front().name == name) ? m_presets.begin() : it;
+ return ((it == m_presets.end() || it->name != name) && m_presets.front().name == name) ? m_presets.begin() : it;
}
std::deque<Preset>::const_iterator find_preset_internal(const std::string &name) const
{ return const_cast<PresetCollection*>(this)->find_preset_internal(name); }