mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-07-20 03:24:24 +08: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
@ -79,7 +79,8 @@ 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());
|
||||||
static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
|
if (opt != nullptr && opt->is_vector())
|
||||||
|
static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user