Bugfix: do not die when no layers are detected at all

This commit is contained in:
Alessandro Ranellucci 2011-12-15 20:36:46 +01:00
parent 18cfc15ead
commit b422537cc4

View File

@ -129,7 +129,7 @@ sub new_from_mesh {
}
# remove empty layers from bottom
while (!@{$print->layers->[0]->slices}) {
while (@{$print->layers} && !@{$print->layers->[0]->slices}) {
shift @{$print->layers};
for (my $i = 0; $i <= $#{$print->layers}; $i++) {
$print->layers->[$i]->id($i);