Fix fatal error on empty layers caused by recent large refactorings

This commit is contained in:
Alessandro Ranellucci 2012-09-28 15:48:32 +02:00
parent ab7697ec1c
commit c68862582c

View File

@ -158,7 +158,7 @@ sub slice {
}
# remove empty layers from bottom
while (@{$self->layers} && !@{$self->layers->[0]->slices} && !@{$self->layers->[0]->thin_walls}) {
while (@{$self->layers} && !@{$self->layers->[0]->slices} && !map @{$_->thin_walls}, @{$self->layers->[0]->regions}) {
shift @{$self->layers};
for (my $i = 0; $i <= $#{$self->layers}; $i++) {
$self->layers->[$i]->id($i);