mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-18 11:02:08 +00:00
Fix crash when switching to profile that has filament count less than used by current project
This commit is contained in:
@@ -1838,6 +1838,7 @@ bool PartPlate::check_mixture_filament_compatible(const DynamicPrintConfig &conf
|
|||||||
auto filament_type_opt = config.option<ConfigOptionStrings>("filament_type");
|
auto filament_type_opt = config.option<ConfigOptionStrings>("filament_type");
|
||||||
for (auto filament : used_filaments) {
|
for (auto filament : used_filaments) {
|
||||||
int filament_idx = filament - 1;
|
int filament_idx = filament - 1;
|
||||||
|
if (filament_idx >= filament_type_opt->values.size()) filament_idx = 0;
|
||||||
filament_types.push_back(filament_type_opt->values[filament_idx]);
|
filament_types.push_back(filament_type_opt->values[filament_idx]);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user