diff options
author | Alessandro Ranellucci <aar@cpan.org> | 2011-11-16 13:26:47 +0400 |
---|---|---|
committer | Alessandro Ranellucci <aar@cpan.org> | 2011-11-16 13:26:47 +0400 |
commit | 9ab81880c9a171a35ea386b0089b532638b209d1 (patch) | |
tree | 9869634f3622ec28072389e82839e8ce5cad2921 /lib/Slic3r/STL.pm | |
parent | 55f00fdb3507355aef8ceeb3b56e94c9f3496497 (diff) |
Throw a fatal exception if no layers are detected
Diffstat (limited to 'lib/Slic3r/STL.pm')
-rw-r--r-- | lib/Slic3r/STL.pm | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Slic3r/STL.pm b/lib/Slic3r/STL.pm index 872957b0b..4536c8892 100644 --- a/lib/Slic3r/STL.pm +++ b/lib/Slic3r/STL.pm @@ -87,6 +87,8 @@ sub parse_file { } } + die "Invalid input file\n" if !@{$print->layers}; + # remove last layer if empty # (we might have created it because of the $max_layer = ... + 1 code below) pop @{$print->layers} if !@{$print->layers->[-1]->surfaces} && !@{$print->layers->[-1]->lines}; |