Bugfix: crash when using non-consecutive extruders. #1808

This commit is contained in:
Alessandro Ranellucci 2014-02-26 11:36:37 +01:00
parent 9ec7ae08ad
commit 71322cc49d
2 changed files with 10 additions and 2 deletions

View file

@ -228,7 +228,7 @@ sub init_extruders {
(map $self->config->get("${_}_extruder")-1, qw(perimeter infill support_material support_material_interface)),
(values %extruder_mapping),
);
for my $extruder_id (keys %{{ map {$_ => 1} @used_extruders }}) {
for my $extruder_id (0 .. max(@used_extruders)) {
$self->extruders->[$extruder_id] = Slic3r::Extruder->new(
config => $self->config,
id => $extruder_id,