From c68862582c299773c803f0beaed554883e9d0d0e Mon Sep 17 00:00:00 2001 From: Alessandro Ranellucci Date: Fri, 28 Sep 2012 15:48:32 +0200 Subject: [PATCH] Fix fatal error on empty layers caused by recent large refactorings --- lib/Slic3r/Print/Object.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Slic3r/Print/Object.pm b/lib/Slic3r/Print/Object.pm index 9443b4cd4..ccb9723ff 100644 --- a/lib/Slic3r/Print/Object.pm +++ b/lib/Slic3r/Print/Object.pm @@ -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);