mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-19 19:33:47 +00:00
Handle empty STL files gracefully instead of crashing. #2557
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user