1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-26 10:25:49 +00:00

Handle empty STL files gracefully instead of crashing. #2557

This commit is contained in:
Alessandro Ranellucci
2015-01-18 12:12:10 +01:00
parent 4696b46475
commit f11196525b
2 changed files with 6 additions and 0 deletions
+3
View File
@@ -14,6 +14,9 @@ sub read_file {
$mesh->ReadSTLFile($path);
$mesh->repair;
die "This STL file couldn't be read because it's empty.\n"
if $mesh->facets_count == 0;
my $model = Slic3r::Model->new;
my $basename = basename($file);