mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-17 11:47:54 -06:00
Improved robustness of handling preset files stored into a wrong location.
Fixes https://github.com/prusa3d/Slic3r/issues/616
This commit is contained in:
parent
8509e4b5f5
commit
9a80ff57b2
1 changed files with 2 additions and 1 deletions
|
@ -79,6 +79,7 @@ void Preset::set_num_extruders(DynamicPrintConfig &config, unsigned int num_extr
|
||||||
auto *opt = config.option(key, false);
|
auto *opt = config.option(key, false);
|
||||||
assert(opt != nullptr);
|
assert(opt != nullptr);
|
||||||
assert(opt->is_vector());
|
assert(opt->is_vector());
|
||||||
|
if (opt != nullptr && opt->is_vector())
|
||||||
static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
|
static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue