mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-05-12 17:48:10 +08:00
Fixed crash on start of the application in case there is no
profile available.
This commit is contained in:
parent
317f651b78
commit
1969a8b2c1
@ -80,7 +80,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())
|
if (opt != nullptr && opt->is_vector() && key != "default_filament_profile")
|
||||||
static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
|
static_cast<ConfigOptionVectorBase*>(opt)->resize(num_extruders, defaults.option(key));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user