mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-14 00:52:04 +00:00
Throw a fatal exception if no layers are detected
This commit is contained in:
@@ -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};
|
||||
|
||||
Reference in New Issue
Block a user