mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-20 20:03:47 +00:00
Prevent crash when changing number of extruders
This commit is contained in:
@@ -738,7 +738,7 @@ sub config {
|
|||||||
# remove all unused values
|
# remove all unused values
|
||||||
foreach my $opt_key ($self->_extruder_options) {
|
foreach my $opt_key ($self->_extruder_options) {
|
||||||
my $values = $config->get($opt_key);
|
my $values = $config->get($opt_key);
|
||||||
splice @$values, $self->{extruders_count};
|
splice @$values, $self->{extruders_count} if $self->{extruders_count} <= $#$values;
|
||||||
$config->set($opt_key, $values);
|
$config->set($opt_key, $values);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user